Setting seed nodes for a single datacenter
Overview of setting seed nodes for a new datacenter.
This overview is a simple example of setting seed nodes for a new datacenter with 5 nodes.
- A seed node is used to bootstrap the gossip process for new nodes joining a cluster.
- To learn the topology of the ring, a joining node contacts one of the nodes in the -seeds list in cassandra.yaml.
- The first time you bring up a node in a new cluster, only one node is the seed node.
- The seeds list is a comma delimited list of addresses. Since this example
cluster includes 5 nodes, you must change the list from the default value
"127.0.0.1"
to the IP address of one of the nodes. - After all nodes are added, all nodes in the datacenter must be configured to use the same seed nodes.
cassandra.yaml
The location of the cassandra.yaml file depends on the type of installation:Package installations | /etc/dse/cassandra/cassandra.yaml |
Tarball installations | installation_location/resources/cassandra/conf/cassandra.yaml |
Preventing problems in gossip communications
To prevent problems in gossip communications, be sure to use the same list of seed nodes for all nodes in a cluster. This is most critical the first time a node starts up. By default, a node remembers other nodes it has gossiped with between subsequent restarts. The seed node designation has no purpose other than bootstrapping the gossip process for new nodes joining the cluster. Seed nodes are not a single point of failure, nor do they have any other special purpose in cluster operations beyond the bootstrapping of nodes.
This single datacenter example has 5 nodes, where nodeA, nodeB, and nodeC are seed nodes.
Node | IP address | Seed |
---|---|---|
nodeA | 110.82.155.0 | ✓ |
nodeB | 110.82.155.1 | ✓ |
nodeC | 110.54.125.1 | ✓ |
nodeD | 110.54.125.2 | |
nodeE | 110.54.155.2 |
Procedure
-
In the new datacenter, install DSE on each
new node. Do not start the service or restart the node.
Important: Use the same version of DSE on all nodes in the cluster.
-
For nodeA, nodeB, and nodeC, configure only nodeA as seed node:
- Start the seed nodes one at a time nodeA, nodeB, and then nodeC.
-
For nodeA, nodeB, and nodeC, change cassandra.yaml to
configure nodeA, nodeB, and nodeC as seed nodes:
You do not need to restart nodeA, nodeB, or nodeC after changing the seed node entry in cassandra.yaml; the nodes will reread the seed nodes.
-
For nodeD and nodeE, change cassandra.yaml to configure
nodeA, nodeB, and nodeC as seed nodes:
-
Start nodeD and nodeE.
Result: All nodes in the datacenter have the same seed nodes: nodeA, nodeB, and nodeC.