O'Reilly logo

Apache Cassandra Essentials by Nitin Padalia

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Removing nodes from Cassandra cluster

Sometimes, we might need to reduce the size of a cluster due to a dead node or a machine with old hardware. In such scenarios, the remaining nodes must take responsibility for the data ranges of the dead node or the node that is being removed. Cassandra provides a command-line utility for both scenarios.

If a node is down and we want to remove it from the cluster, then we should run nodetool removenode <Dead-Node-ID> from some other node. This command streams the data for which this node was responsible to remaining nodes from the remaining replicas. In order to get the dead node ID, we can use the nodetool status command, as follows:

$ nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required