Adding a datacenter to a single-token architecture cluster
Steps for adding a datacenter to single-token architecture clusters, not clusters using Virtual nodes.
|
Only add new nodes to the cluster.
A new node is a system in which DataStax Enterprise (DSE) has never started.
The node must have absolutely NO PREVIOUS DATA in the data directory, |
Where is the cassandra-topology.properties file?
The location of the cassandra-topology.properties file depends on the type of installation:
| Installation Type | Location |
|---|---|
Package installations + Installer-Services installations |
|
Tarball installations + Installer-No Services installations |
|
Where is the cassandra-rackdc.properties file?
The location of the cassandra-rackdc.properties depends on the type of installation:
| Installation Type | Location |
|---|---|
Package installations + Installer-Services installations |
|
Tarball installations + Installer-No Services |
|
Where is the cassandra.yaml file?
The location of the cassandra.yaml file depends on the type of installation:
| Installation Type | Location |
|---|---|
Package installations + Installer-Services installations |
|
Tarball installations + Installer-No Services installations |
|
-
Ensure that you are using
NetworkTopologyStrategyfor all keyspaces. -
For each new node, edit the configuration properties in the
cassandra.yamlfile:-
Set
auto_bootstraptoFalse. -
Set the
initial_token. Be sure to offset the tokens in the new datacenter, see Initializing single-token architecture datacenters. -
Set the
cluster name. -
Set any other non-default settings.
-
Set the seed lists. Every node in the cluster must have the same list of seeds and include at least one node from each datacenter. Typically one to three seeds are used per datacenter.
-
-
Update either the properties file on all nodes to include the new nodes. You do not need to restart.
-
GossipingPropertyFileSnitch:cassandra-rackdc.properties -
PropertyFileSnitch:cassandra-topology.properties
-
-
Ensure that your client does not auto-detect the new nodes so that they aren’t contacted by the client until explicitly directed.
-
If using a
QUORUMconsistency level for reads or writes, check theLOCAL_QUORUMorEACH_QUORUMconsistency level to make sure that the level meets the requirements for multiple datacenters. -
The
GossipingPropertyFileSnitchalways loadscassandra-topology.propertieswhen that file is present. Remove the file from each node on any new cluster or any cluster migrated from thePropertyFileSnitch. -
After all nodes are running in the cluster:
-
Change the replication factor for your keyspace for the expanded cluster.
-
Run
nodetool rebuildon each node in the new datacenter.
-