I want to set up an existing cassandra cluster to have the nodes split over two data centers. To achieve this I have updated my cassandra.yaml files to use
endpoint_snitch: GossipingPropertyFileSnitch
and updated the cassandra-rackdc.properties file for each node defining a rack and a dc.
I have cleared all Cassandra data from the programdata directory and restarted all cassandra services and checked with nodetool the configuration is correct, but after startup I see that all of the system keyspaces that Cassandra automatically creates are configured the same as before.
None mention the data centers, system_auth has a replication factor of 1 still while there are at least two nodes in each data center and the replication strategy used is SimpleStrategy while the documentation mentions NetworkTopologyStrategy should be used when using multiple datacenters.
Should I update these manually (eg: ALTER KEYSPACE system_auth WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc1' : 2, 'dc2' : 2 };)?
I get a warning that ALTER is not allowed on system keyspaces though.
Hi Alexander,
By default, the keyspaces are created with the replication strategy 'SimpleStrategy'. It is always advised to use the GossipingPropertyFileSnitch with the 'NetworkTopologyStrategy' for your keyspaces. So indeed you will need to update the keyspaces as per the command you provided.
You should not worry about the warning (probably only in DevCenter).
Note that from 10.2.0 [CU9]/10.2.12, the default was changed to NetworkTopologyStrategy.
See Release Note #34417.
That is for the keyspaces created by DataMiner, but upon the initial installation of Cassandra the system keyspaces will be created with SimpleStrategy
You can increase the RF if you want to increase availability but keep in mind that system_auth is using LOCAL_QUORUM when authenticating users by default (configurable in the yaml file), so the cost of this authentication will scale up with the RF.