Scylla Snitches

Snitch determines which data centers and racks nodes belong to, Snitches inform Scylla about the network topology so that requests are routed efficiently and allows Scylla to distribute replicas by grouping machines into data centers and racks

Scylla supports the following snitches:

SimpleSnitch

Bind all Nodes to the same Rack and data-center. This snitch is used in a single data-center deployment

RackInferringSnitch

Bind Nodes to DCs and Racks according to their Broadcast IPs:

For Example:

Node has a Broadcast IP 192.168.100.200, then it would belong to a DC ‘168’ and Rack ‘100’

GossipingPropertyFileSnitch

Recommended to be used in production installations. It allows to explicitly define which DC and Rack a specific Node belongs to This snitch reads its configuration from a cassandra-rackdc.properties file that located under /etc/scylla/

For Example:

prefer_local=true
dc=my_data_center
rack=my_rack

Set the prefer_local to true will tell Scylla to use local IP address. The local IP address is the listen_address parameter from the scylla.yaml file which is located under /etc/scylla/

Ec2Snitch

Basic snitch that reads its configuration from Amazon’s EC2 registry services

For Example:

Node is in a us-west-1 region, then it’s DC=’us-west’ and Rack=‘1’

Ec2MultiRegionSnitch

Works like the Ec2Snitch, in addition, it set the broadcast address and broadcast_rpc_address of a node to the node’s public IP. This would allow nodes from other zones to communicate with this node regardless of what is configured in the node’s scylla.yaml configuration file for broadcast_address and broadcast_rpc_address parameters

Ec2MultiRegionSnitch also unconditionally imposes the “prefer local” policy on a node (similar to GossipingPropertyFileSnitch when prefer_local is set to true)

Getting Started