Configuring the Amazon EC2 single-region snitch
Use the Ec2Snitch
snitch for an Amazon EC2 deployments that are in a
single region.
cassandra-rackdc.properties
The location of the cassandra-rackdc.properties file depends on the type of installation:Package installations | /etc/dse/cassandra/cassandra-rackdc.properties |
Tarball installations | installation_location/resources/cassandra/conf/cassandra-rackdc.properties |
Use the Ec2Snitch
for simple cluster deployments on Amazon EC2 where all
nodes in the cluster are within a single region. Because private IPs are used, this snitch
does not work across multiple regions.
In EC2 deployments, the region name is treated as the datacenter name and availability zones are treated as racks within a datacenter. For example, if a node is in the us-east-1 region, us-east is the datacenter name and 1 is the rack location. (Racks are important for distributing replicas, but not for datacenter naming.)
If you are using only a single datacenter, you do not need to specify any properties.
If you need multiple datacenters, set the dc_suffix options in the cassandra-rackdc.properties file. Any other lines are ignored.
- node0
dc_suffix=_1_cassandra
- node1
dc_suffix=_1_cassandra
- node2
dc_suffix=_1_cassandra
- node3
dc_suffix=_1_cassandra
- node4
dc_suffix=_1_analytics
- node5
dc_suffix=_1_search
us-east_1_cassandra
us-east_1_analytics
us-east_1_search
Keyspace strategy options
When defining your keyspace strategy options, use the EC2 region name, such as ``us-east``, as your datacenter name.