Updating and removing nodes

Certify and Increase Opportunity.
Be
Govt. Certified Apache Cassandra Professional

Updating and removing nodes

Adding Nodes to a Cluster

  1. Install Cassandra on the new nodes, but do not start them.
  2. Calculate the tokens for the nodes based on the expansion strategy you are using. You can skip this step if you want the new nodes to automatically pick a token range when joining the cluster.
  3. Set the configuration for the new nodes.
  4. Set the initial_token according to your token calculations (or leave it unset if you want the new nodes to automatically pick a token range when joining the cluster).
  5. Start Cassandra on each new node. Allow a two minutes between node initializations. You can monitor the startup and data streaming process using nodetool netstats.
  6. After the new nodes are fully bootstrapped, assign the new initial_token property value to the nodes that required new tokens, and then run nodetool move <new_token>, one node at a time.
  7. After all nodes have their new tokens assigned, run nodetool cleanup on each of the existing nodes to remove the keys no longer belonging to those nodes. Wait for cleanup to complete on one node before doing the next. Cleanup may be safely postponed for low-usage hours.

Removing a Node

If you have decided to remove a node from a live cluster you can follow one of the two options based on which one suits you better.Nodetool is available in the cassandra home directory{CASSANDRA_HOME}/bin/nodetool decommission
{CASSANDRA_HOME}/bin/nodetool removetoken

Removing nodes entirely

* Decommission :
 
You can take a node out of the cluster with nodetool decommission to a live node. This will assign the ranges the old node was responsible for to other nodes, and replicate the appropriate data there. If decommission is used, the data will stream from the decommissioned node.
No data is removed automatically from the node being decommissioned, so if you want to put the node back into service at a different token on the ring, it should be removed manually.
* Remove Token :
 
You can execute nodetool removetoken on any available machine to remove a dead one. This will assign the token range the old node was applicable to other nodes. If removetoken is used, the data will stream from the remaining replicas.
-Datastax
Share this post
[social_warfare]
Snapshot management
Data model and terms

Get industry recognized certification – Contact us

keyboard_arrow_up