2 min to complete
The Snitch is responsible for determining which racks and datacenters are to be written and read from. ScyllaDB supports the following snitches:
- SimpleSnitch: Default value, should only be used in single DC clusters
- GossipingPropertyFileSnitch: Explicitly define for each node in which Rack and DC it belongs. It’s better to use this instead of Simplesnitch
- Ec2Snitch: Learns the topology on its own from AWS API. Useful for single region clusters deployed on AWS. The region is treated as a DC.
- Ec2MultiRegionSnitch: Same as Ec2Snitch but for multiple region deployments.
- GoogleCloudSnitch: For deploying ScyllaDB on the Google Cloud Engine (GCE) platform across one or more regions. The region is treated as a datacenter, and the availability zones are treated as racks within the datacenter.
More info can be found in the ScyllaDB Docs section.
To see the snitch defined in our multi-dc cluster, we use the describecluster command:
docker exec -it scylla-node1 nodetool describecluster
We can see that the Snitch being used is the GossipingPropertyFileSnitch. It allows us to explicitly define which DC and Rack a specific Node belongs to. This snitch reads its configuration from a cassandra-rackdc.properties file located under /etc/scylla/
docker exec -it scylla-node1 cat /etc/scylla/cassandra-rackdc.properties