Can we replace a node(say X) that is down with a new node(say Y) and make it act similar to X ? Can we make some arrangement that the node ranges of X and Y are same?
Can we replace a node(say X) that is down with a new node(say Y) and make it act similar to X ? Can we make some arrangement that the node ranges of X and Y are same?
Yes, you can. That is the whole idea behind replacing a dead node say for example a node that's had a hardware failure.
There are different ways of handling this depending on the situation you're facing.
If a server has had a full hardware failure and is unrecoverable, you can replace it with a new server. You just need to install Cassandra on it and configure it in exactly the same way as the node being replaced.
You will also need to configure it with the replace_address
flag configured in the cassandra-env.sh
with the dead node's IP address:
JVM_OPTS="$JVM_OPTS -Dcassandra.replace_address=ip_of_dead_node
This will let the replacement bootstrap with the exact token(s) assignments as the dead node.
For details, see Replacing a dead node.
If the dead node's drives are still intact, you can simply swap them into a new server provided they're still in working order. When Cassandra starts, the rest of the nodes in the cluster will recognise the server as a new node with a new IP address but with the data and token(s) exactly the same.
If for some reason only the data/
disk is recoverable, you can mount it to the new server but you will still need to install and configure Cassandra. But as above, when you start C* it will recognise the server as a new node with a new IP address and will be part of the cluster as normal since the data and token(s) are the same. Cheers!
6 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use