Which snitch or replication strategy should I use?

Can I use SimpleSnitch and SimpleStrategy if I have a single datacenter?

One should always use “NetworkTopologyStrategy” as it saves you from troubles later.
I think we even wants/wanted to deprecate SimpleStrategy.

Regarding Snitch, it depends where you run your cluster. e.g. AWS, GCP and Azure have special snitches.

The general recommendation is to always use the NetworkTopologyStrategy and:

  • Ec2XXX snitch on AWS based clusters
  • GossipingPropertyFileSnitch in all other cases

You can learn more about Snitches here.

It is not recommended to use SimpleSnitch in any case, and it will probably be deprecated in the future.

Using an incorrect snitch-strategy combination may cause different types of errors, for example:

Unavailable: code=1000 [Unavailable exception] message=“Cannot achieve consistency level for cl LOCAL_ONE. Requires 1, alive 0” info={‘required_replicas’: 1, ‘alive_replicas’: 0, ‘consistency’: ‘LOCAL_ONE’}

If you see this error, make sure that you are not using a SimpleSnitch in your cluster configuration in conjunction with some DC-aware replication strategy.

Also, make sure that you edit the cassandra-rackdc.properties file and that your data center names are configured correctly. You can see the names using the nodetool status command.