Use the Ec2Snitch with Amazon EC2 in a single region.

Use the Ec2Snitch for simple cluster deployments on Amazon EC2 where all nodes in the cluster are within a single region.

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 data center name and 1 is the rack location. (Racks are important for distributing replicas, but not for datacenter naming.) Because private IPs are used, this snitch does not work across multiple regions.

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 file. Any other lines are ignored.

For example, for each node within the us-east region, specify the data center in its file:
Note: datacenter names are case-sensitive.
  • node0


  • node1


  • node2


  • node3


  • node4


  • node5


This results in three datacenters for the region:
Note: The datacenter naming convention in this example is based on the workload. You can use other conventions, such as DC1, DC2 or 100, 200. Datacenter names are case sensitive.

Keyspace strategy options

When defining your keyspace strategy options, use the EC2 region name, such as us-east, as your datacenter name.

The location of the file depends on the type of installation:
Package installations /etc/cassandra/
Tarball installations install_location/conf/