incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Bromhead <>
Subject Re: Can Cassandra client programs use hostnames instead of IPs?
Date Tue, 13 May 2014 14:45:45 GMT
You can set listen_address in cassandra.yaml to a hostname (

Cassandra will use the IP address returned by a DNS query for that hostname. On AWS you don't
have to assign an elastic IP, all instances will come with a public IP that lasts its lifetime
(if you use ec2-classic or your VPC is set up to assign them).

Note that whatever hostname you set in a nodes listen_address, it will need to return the
private IP as AWS instances only have network access via there private address. Traffic to
a instances public IP is NATed and forwarded to the private address. So you may as well just
use the nodes IP address.

If you run hadoop on instances in the same AWS region it will be able to access your Cassandra
cluster via private IP. If you run hadoop externally just use the public IPs. 

If you run in a VPC without public addressing and want to connect from external hosts you
will want to look at a VPN (

Ben Bromhead
Instaclustr | | @instaclustr | +61 415 936 359

On 13/05/2014, at 4:31 AM, Huiliang Zhang <> wrote:

> Hi,
> Cassandra returns ips of the nodes in the cassandra cluster for further communication
between hadoop program and the casandra cluster. Is there a way to configure the cassandra
cluster to return hostnames instead of ips? My cassandra cluster is on AWS and has no elastic
ips which can be accessed outside AWS.
> Thanks,
> Huiliang

View raw message