Setting seed nodes for a single datacenter

This overview is a simple example of setting seed nodes for a new datacenter with 5 nodes.

About seed 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.

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.

Making every node a seed node is not recommended because of increased maintenance and reduced gossip performance. Gossip optimization is not critical, but it is recommended to use a small seed list (approximately three nodes per datacenter).

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

  1. Install DSE on each node in the new datacenter, install DSE. Do not start the service or restart the node.

    Use the same version of DSE on all nodes in the cluster.

  2. For nodeA, nodeB, and nodeC, configure only nodeA as seed node:

    1. In cassandra.yaml:

      seed_provider:
          - class_name: org.apache.cassandra.locator.SimpleSeedProvider
                - seeds: 110.82.155.0
  3. Start the seed nodes one at a time nodeA, nodeB, and then nodeC.

  4. For nodeA, nodeB, and nodeC, change cassandra.yaml to configure nodeA, nodeB, and nodeC as seed nodes:

    1. In cassandra.yaml:

      seed_provider:
          - class_name: org.apache.cassandra.locator.SimpleSeedProvider
                - seeds: 110.82.155.0, 110.82.155.1, 110.54.125.1

      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.

  5. For nodeD and nodeE, change cassandra.yaml to configure nodeA, nodeB, and nodeC as seed nodes:

    1. In cassandra.yaml:

      seed_provider:
          - class_name: org.apache.cassandra.locator.SimpleSeedProvider
                - seeds: 110.82.155.0, 110.82.155.1, 110.54.125.1
  6. Start nodeD and nodeE.

    Result: All nodes in the datacenter have the same seed nodes: nodeA, nodeB, and nodeC.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com