Database Reference
In-Depth Information
Removing nodes from a cluster
It may not always be desired to have a high number of nodes up all the time. It adds to the
cost and maintenance overhead. In many situations where one has scaled out to cope with a
sudden surge in the traffic (for high I/O) or to avoid a hotspot for a while, it may be re-
quired to retire some machines and come back to the normal operation mode. Another reas-
on to remove a node is due to hardware or communication failure, like a dead node that
needs to be ejected out of the ring.
Removing a live node
Removing a live node is to stream the data out of the node to its neighbors. The command
to remove a live node is nodetool decommission . That's all. You are done with re-
moving a live node. It will take some time to stream the data, and you may need to rebal-
ance the cluster.
We will see what decommissioning a node looks like. Assume that the ring is the same as
when we added a node to a three-node cluster. The following command will show the pro-
cess of decommissioning a live node:
$ /opt/cassandra/bin/nodetool -h 10.10.21.206 decommission
This will decommission the node at 10.10.21.206 . It is a blocking process, which
means the CLI will wait till the decommissioning gets done. Here is how netstats on
the node looks:
$ for i in {1..300} ; do /opt/cassandra/bin/nodetool -h
10.10.21.206 netstats; sleep 1; done
Mode: NORMAL
Not sending any streams.
Read Repair Statistics:
Attempted: 0
Mismatch (Blocking): 0
Mismatch (Background): 0
Pool Name Active Pending Completed
Commands n/a 1 2
Search WWH ::




Custom Search