Multiple data centers
In practical scenarios, we would want to have Cassandra clusters distributed across different data centers so that the system is more reliable and resilient overall to localized network snags and physical disasters.
Prerequisites for setting up multiple data centers
The following are a set of prerequisites that should be used for setting up multiple data centers:
Have Cassandra installed on each node
Have the IP address of each node in the cluster
Identify the cluster names
Identify the seed nodes
Identify the snitch that is to be used
Installing Cassandra data centers
The following are a set of steps to set up Cassandra data centers:
Let's start with an assumption that we have already installed Cassandra on the following nodes:
10.188.66.41 (seed1)
10.196.43.66
10.188.247.41
10.196.170.59 (seed2)
10.189.61.170
10.189.30.138
Assign tokens using the token generation Python script defined in the previous section to each of the preceding nodes.
Let's say we align to the following distribution...