Apache Cassandra™ 1.2

Removing a node

Reduce the size of a data center.

Use these instructions when you want to remove up nodes to reduce the size of your cluster, not for replacing a dead node.
Attention: If you are not using virtual nodes (vnodes), you must rebalance the cluster.

Procedure

  1. Run a repair on each keyspace:
    $ nodetool repair -h ip_address_of_node keyspace_name

    The nodetool repair command repairs inconsistencies across all of the replicas for a given range of data.

  2. If the node is up, run nodetool decommission.

    This assigns the ranges that the node was responsible for to other nodes and replicates the data appropriately.

    Use nodetool netstats to monitor the progress.

  3. If the node is down, following the steps in Replacing a dead node except don't replace the node.
  4. If using vnodes, remove the node using the nodetool removenode command.
  5. If not using vnodes, removing a node from the cluster will create a hotspot. Adjust your tokens to evenly distribute the data across the remaining nodes before running the nodetool removenode command.

    For information on how to do this, see the following topics in the Cassandra 1.1 documentation: