cassandraoperations

#Cassandra - What is the difference between nodetool removenode , decommission, assassinate, replace?


In order to remove a node (working / non working) which command is applicable in which situation?


Solution

  • Decommission streams data from the leaving node. Therefore, you are guaranteed to maintain the same consistency that you had at the time you start the operation.

    Removenode streams data from any available node that owns the range. It's possible you could violate consistency (and even potentially lose data) depending on your time since repair and the consistency level you use to write data.

    Typically, you should prefer decommission if possible. Imagine you have 5 node cluster (A-E), and a given write would go to B, C, and D. You write with quorum, so for some reason C is down, but a write goes to B and D. When C comes back online, D needs to be removed from the cluster (you're downsizing, or changing drives, or something).

    Assassinate is a rarely used tool that should only be used tool to force a node out of a cluster. No streaming is performed. The chance of data loss is significantly higher, especially if you use RF < 3 and write with CL < ALL.