Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Cassandra Add Node

Adding a node (bootstrapping) expands cluster capacity by introducing a new node that receives a portion of the existing data.


  • New node with Cassandra installed (same version as cluster)
  • Network connectivity to existing nodes (ports 7000, 9042, 7199)
  • Sufficient disk space for data share
  • cassandra.yaml configured with correct cluster name and seeds

Terminal window
# On existing node
nodetool status

All nodes should show UN (Up/Normal).

Terminal window
nodetool compactionstats
nodetool netstats

Avoid bootstrapping during heavy compaction or repairs.

On new node:

Terminal window
# Verify Cassandra is installed
cassandra -v
# Verify configuration
grep -E "cluster_name|seeds|listen_address" /etc/cassandra/cassandra.yaml

Required cassandra.yaml settings:

cluster_name: 'MyCluster' # Must match existing cluster
seeds: "existing-node1,existing-node2" # 2-3 existing nodes
listen_address: <new-node-ip>
rpc_address: <new-node-ip> # Or 0.0.0.0
auto_bootstrap: true # Default, ensures data streaming

Step 4: Clear Data Directories (If Reusing Hardware)

Section titled “Step 4: Clear Data Directories (If Reusing Hardware)”
Terminal window
sudo rm -rf /var/lib/cassandra/data/*
sudo rm -rf /var/lib/cassandra/commitlog/*
sudo rm -rf /var/lib/cassandra/saved_caches/*
sudo rm -rf /var/lib/cassandra/hints/*

Terminal window
sudo systemctl start cassandra
# Monitor startup
tail -f /var/log/cassandra/system.log

On any node:

Terminal window
nodetool status

New node will show as UJ (Up/Joining) during bootstrap.

Terminal window
# On new node - watch streaming
nodetool netstats

Bootstrap can take hours. The node is not fully operational until complete.

Terminal window
# Monitor from existing node
watch -n 60 'nodetool status'
Terminal window
nodetool status

New node should show UN (Up/Normal).

After successful bootstrap, run cleanup to remove data that moved to new node:

Terminal window
# On each existing node
nodetool cleanup
# Or cleanup specific keyspace
nodetool cleanup my_keyspace

Cleanup Timing

Cleanup should be run after bootstrap completes but before the next repair. It removes data that no longer belongs to the node.


Check logs:

Terminal window
grep -i "bootstrap\|gossip\|schema" /var/log/cassandra/system.log | tail -50

Common causes:

  • Wrong cluster name → Fix in cassandra.yaml
  • Cannot reach seeds → Check network connectivity
  • Schema disagreement → Fix on existing cluster first
Terminal window
# Check reason
grep -i "error\|failed" /var/log/cassandra/system.log | tail -50
# Common fixes:
# 1. Clear data and retry
sudo systemctl stop cassandra
sudo rm -rf /var/lib/cassandra/data/*
sudo systemctl start cassandra
# 2. If disk full on source nodes
nodetool clearsnapshot --all # On source nodes
Terminal window
# Check streaming throughput
nodetool getstreamthroughput
# Increase if network allows (value in Mb/s by default)
nodetool setstreamthroughput 400
# Or specify MiB/s explicitly with -m flag
nodetool setstreamthroughput -m 50 # 50 MiB/s

Streaming Throughput Units

nodetool setstreamthroughput uses megabits per second (Mb/s) by default. Use the -m flag to specify MiB/s instead. The cassandra.yaml setting stream_throughput_outbound uses MiB/s (24 MiB/s default in Cassandra 4.1+).

This may indicate initial_token is set incorrectly or auto_bootstrap was false.

Terminal window
# Check token assignment
nodetool ring | grep <new-node-ip>
# May need to decommission and re-add with correct settings

On source and target nodes:

Terminal window
# Increase stream throughput (value in Mb/s by default)
nodetool setstreamthroughput 400
# Or specify MiB/s explicitly
nodetool setstreamthroughput -m 50 # 50 MiB/s
Terminal window
# On new node
nodetool netstats
# Watch for:
# - Receiving from multiple nodes
# - Progress increasing

Terminal window
# On each existing node (one at a time to limit impact)
nodetool cleanup

If adding to seed nodes, update cassandra.yaml on all nodes:

seeds: "node1,node2,new-node" # Add new node if it should be a seed
Terminal window
nodetool status

Check that data is roughly balanced across nodes.

Terminal window
# After cleanup, ensure data consistency
nodetool repair -pr

When adding multiple nodes:

  1. Add one at a time - Wait for each bootstrap to complete
  2. Run cleanup after all additions - More efficient
  3. Alternatively: Add all at once with calculated tokens (advanced)
Terminal window
# Node A: Start and wait for UN status
# Node B: Start and wait for UN status
# Node C: Start and wait for UN status
# Then: Run cleanup on all existing nodes

Cluster Data SizeBootstrap Duration
< 100 GB total30 min - 1 hour
100 GB - 1 TB1-4 hours
1 TB - 10 TB4-24 hours
> 10 TB24+ hours

Duration depends on:

  • Total data in cluster
  • Number of existing nodes
  • Network bandwidth
  • Disk I/O speed

PracticeReason
Add during low-traffic periodsReduces impact
Add one node at a timePrevents overload
Monitor throughoutCatch issues early
Run cleanup afterReclaim space on old nodes
Verify token distributionEnsure balanced cluster
Update monitoringInclude new node

ScenarioProcedure
Removing nodeDecommission Node
Replacing failed nodeReplace Dead Node
Cluster not healthyFix issues first
CommandPurpose
nodetool statusCluster overview
nodetool netstatsStreaming progress
nodetool cleanupRemove relocated data
nodetool ringToken distribution
nodetool setstreamthroughputAdjust streaming speed