question

biswa333_125242 avatar image
biswa333_125242 asked Erick Ramirez edited

When a new node join in the cluster by what process a node learn its relationship in the cluster?

When a new node joins in the cluster by what process a node learn its relationship in the cluster?

add nodes
1 comment
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

dmngaya avatar image dmngaya commented ·

Bootstraping is the process of adding a new node in the cluster.

1) Joining node contact a seed node

2) the seed node communicates cluster info including token tanges to the joining node

3) Existing cluster nodes prepare to stream necessary sstables to the joining node

4) Existing cluster nodes stream necessary sstables to the joining node (it can be time consuming)

5)Existing cluster nodes continue to satistfy writes but also forward write to the joining node

6) When streaming is complete, joining node changes to normal state and handles read and write requests


How to do that ? Four main parameters to bootstrap a node:

1) cluster name

2) native_transport_address

3) Listen_address

4) -seeds

0 Likes 0 ·

1 Answer

saravanan.chinnachamy_185977 avatar image
saravanan.chinnachamy_185977 answered

A new node bootstraps into the cluster by the following high level steps.

  • Joining node contacts a seed node to learn about gossip state.
  • Joining node transitions to Up and Joining state (to indicate it is joining the cluster; represented by UJ in the nodetool status).
  • Contacts the seed nodes to ensure schema agreement.
  • Seed node shares cluster information with the joining node including token information.
  • Joining node calculates token(s) it is responsible for and shares with seed node.
  • Existing nodes prepare to stream data to joining node.
  • existing nodes stream only the SSTables that hold keys for new node.No data is removed from existing nodes.
  • Writes during this streaming period continue to be written to the existing nodes.these writes get forwarded to new node.
  • Joining node switches from JOINING to NORMAL state.write and read request no go to the new node.

For a more detailed explanation on the boot strapping process, please refer to the documentation Bootstrapping Apache Cassandra Nodes

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.