Database / Apache Cassandra Intermediate and Advanced interview questions
How do you add a new node to a Cassandra cluster?
Adding a node is designed to be an online operation — the rest of the cluster keeps serving traffic while the new node joins and streams data.
- Install Cassandra on the new host and configure
cassandra.yaml: samecluster_name, correctseedslist (pointing at existing nodes, not itself), correct snitch, and appropriatelisten_address/rpc_address. - Start the Cassandra process. The node contacts the seeds via gossip, learns the cluster topology, and is assigned token ranges (automatically, under vnodes).
- The node enters bootstrap mode: it streams the data it now owns from the existing replicas responsible for those token ranges, without yet serving client reads.
- Once bootstrap completes, the node announces itself as fully joined via gossip and starts serving reads and writes for its owned ranges.
- Afterward, run
nodetool cleanupon the existing nodes so they discard data they no longer own now that the new node has taken over part of their previous token ranges.
Best practice is to add one node at a time (or use nodetool bootstrap resume if a join is interrupted) and monitor streaming progress with nodetool netstats before adding the next.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
