Cassandra tutorial (6)-Snitch
Snitch determines which data center and rack the node belongs to. Snitch informs Cassandra of the network topology so that requests are effectively routed and allows Cassandra to distribute copies when servers are added to the data center or rack. In particular, how the replication policy places the replica is based on the information provided by the new snitch. Cassandra does not put copies in a rack (if the rack is powered off, it is over).
Dynamic snitching
Monitoring the performance of reading data from a large number of copies and selecting the best copy are based on these historical conditions. By default, all snitch also use a dynamic snitch layer to monitor read latency and, where possible, do not route requests for low-performance nodes. Dynamic snitch is enabled by default, which is recommended in most cases.
SimpleSnitch
This option is available only when there is one data center. By default, SimpleSnitch does not know the data center and rack information. If you want to use it, you need to use SimpleStrategy and specify a replication factor when defining keyspace.
RackInferringSnitch
This is through the rack or data center IP to determine the location of the node.
PropertyFileSnitch
It also determines the location of nodes through a rack or data center. You need to configure cassandra-topology.properties on your own. If your IP has no rules or has complex replication requirements, you can use this snitch. This snitch requires you to define each node in cassandra-topology.properties (somewhat troublesome).
GossipingPropertyFileSnitch
This snitch automatically updates each node through gossip as it adds new nodes.
There are others such as EC2Snitch,EC2MultiRegionSnitch,GoogleCloudSnitch,CloudstackSnitch, which will not be studied for the time being because it is on the external common cloud.