Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Cassandra Snitch Configuration

The snitch determines how Cassandra maps nodes to datacenters and racks.

SnitchUse Case
SimpleSnitchSingle DC, no rack awareness
GossipingPropertyFileSnitchProduction (recommended)
PropertyFileSnitchLegacy
Ec2SnitchAWS single region
Ec2MultiRegionSnitchAWS multi-region
GoogleCloudSnitchGCP
RackInferringSnitchIP-based inference
cassandra.yaml
endpoint_snitch: GossipingPropertyFileSnitch
cassandra-rackdc.properties
dc=datacenter1
rack=rack1
# Optional
prefer_local=true
dc_suffix=_analytics
# Node in DC1
dc=us-east
rack=rack1
# Node in DC2
dc=eu-west
rack=rack1
cassandra.yaml
endpoint_snitch: Ec2Snitch
# Automatic:
# DC = region (us-east-1)
# Rack = availability zone (us-east-1a)
cassandra.yaml
endpoint_snitch: Ec2MultiRegionSnitch
listen_address: <private_ip>
broadcast_address: <public_ip>
cassandra.yaml
endpoint_snitch: GoogleCloudSnitch
# Automatic:
# DC = project:region
# Rack = zone
Terminal window
# 1. Update cassandra.yaml on all nodes
# 2. Update cassandra-rackdc.properties
# 3. Rolling restart cluster
# 4. Run repair
nodetool repair -full
Terminal window
# Check datacenter/rack assignment
nodetool status
# Detailed gossip info
nodetool gossipinfo | grep -E "DC|RACK"