Snitches
As discussed earlier, Cassandra is able to intelligently place replicas across the cluster if you provide it with enough information about your topology. You give this insight to Cassandra through a snitch, which is set using the endpoint_snitch
property in cassandra.yaml
. The snitch is also used to help Cassandra route client requests to the closest nodes to reduce network latency.
As of version 2.0, there are eight available snitch options (and you can write your own as well):
SimpleSnitch
: This snitch is a companion to theSimpleStrategy
replication strategy. It is designed for simple single data center configurations.RackInferringSnitch
: As the name implies, this snitch attempts to infer your network topology. Using this snitch is discouraged because it assumes that your IP addressing scheme reflects your data center and rack configuration. For this to work properly, your addresses must be in the following form:
PropertyFileSnitch
: Using this snitch allows the administrator...