cassandra-rackdc.properties file

snitch options use the cassandra-rackdc.properties configuration file to determine which datacenters and racks cluster nodes belong to. Information about the network topology allows requests to be routed efficiently and to distribute replicas evenly. The following snitches can be configured here:

  • GossipingPropertyFileSnitch
  • AWS EC2 single-region snitch
  • AWS EC2 multi-region snitch cassandra-rackdc.properties file and propagates the information to other nodes using gossip. It is the default snitch and the settings in this properties file are enabled. cassandra-rackdc.properties options to designate one of two AWS EC2 datacenter and rack naming conventions:
  • legacy: Datacenter name is the part of the availability zone name preceding the last “-“ when the zone ends in -1 and includes the number if not -1. Rack name is the portion of the availability zone name following the last “-“.

    Examples: us-west-1a ⇒ dc: us-west, rack: 1a; us-west-2b ⇒ dc: us-west-2, rack: 2b;

  • standard: Datacenter name is the standard AWS region name, including the number. Rack name is the region plus the availability zone letter.

    Examples: us-west-1a ⇒ dc: us-west-1, rack: us-west-1a; us-west-2b ⇒ dc: us-west-2, rack: us-west-2b; Either snitch can set to use the local or internal IP address when multiple datacenters are not communicating.

    GossipingPropertyFileSnitch

    dc

    Name of the datacenter. The value is case-sensitive. Default value: DC1

    rack

    Rack designation. The value is case-sensitive. Default value: RAC1

    AWS EC2 snitch

    ec2_naming_scheme

    legacy or standard (default). This option is commented out by default. Default value: standard

    Either snitch

    prefer_local

    This option is commented out by default. Default value: true