cassandra-rackdc.properties file
The GossipingPropertyFileSnitch
uses the cassandra-rackdc.properties
configuration file to determine which datacenters and racks nodes belong to.
This informs the database about the network topology to route requests efficiently and distribute replicas evenly.
Settings for this file depend on the type of snitch:
GossipingPropertyFileSnitch
This snitch is recommended for production.
It uses rack and datacenter information for the local node defined in the cassandra-rackdc.properties
file and propagates this information to other nodes via gossip.
To configure a node to use GossipingPropertyFileSnitch
, edit the cassandra-rackdc.properties
file as follows:
-
Define the datacenter and rack that include this node. The default settings:
dc=DC1 rack=RAC1
Datacenter and rack names are case-sensitive.
-
To save bandwidth, add the
prefer_local=true
option. This option tells HCD to use the local IP address when communication is not across different datacenters.