Replacing a node
More often than not, you find yourself in a less than situation where you do not really want to remove a dead node; instead, you want to replace it. The reasons can be many, your cloud service provider finds that a node is sitting on degraded hardware and kills the nodes with a notification mail to you.
All versions after Cassandra Version 1.2 have simplified replacing a node to merely running one command. Here are the steps to replace a node:
- Install Cassandra on the new node. Make sure
conf/cassandra.yaml
has all the custom changes that exist in other nodes. (The best way to do this is to copycassandra.yaml
from a live node, and change the node-specific setting.) - Make sure you have got the following variables right:
cluster_name ...
Get Mastering Apache Cassandra - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.