Skip to content

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

Cassandra Cluster Management Operations

This section covers operational procedures for managing Cassandra cluster topology: adding capacity, removing nodes, replacing failed hardware, and managing multi-datacenter deployments.

Architecture Reference

For conceptual details on how Cassandra manages cluster membership, see Cluster Management Architecture.


OperationUse CaseCommandImpact
Add NodeExpand capacityStart node with auto_bootstrap: trueStreaming to new node
DecommissionGraceful removal (node up)nodetool decommissionStreaming from departing node
Remove NodeForced removal (node down)nodetool removenodeStreaming among remaining nodes
Replace NodeHardware replacementreplace_address_first_bootStreaming to replacement
Scale UpAdd multiple nodesSequential bootstrapMultiple streaming operations
Scale DownReduce capacitySequential decommissionMultiple streaming operations
Add DatacenterGeographic expansionRebuild from existing DCCross-DC streaming
Remove DatacenterConsolidationDecommission all DC nodesData redistribution
CleanupReclaim space after addingnodetool cleanupI/O intensive
AssassinateLast resort removalnodetool assassinateImmediate, no streaming

The following requirements must be observed for all topology operations:

RequirementRationale
All nodes should show UN statusTopology changes with degraded nodes increase risk; proceed with caution if necessary
No pending repairs must be runningConcurrent operations cause unpredictable behavior
No other topology changes must be in progressOnly one topology change may occur at a time
Sufficient disk headroom must existStreaming requires temporary additional space
Schema agreement must be confirmedSchema disagreement causes bootstrap failures
Terminal window
# Pre-flight verification
nodetool status # All nodes UN
nodetool describecluster # Single schema version
nodetool compactionstats # No heavy compaction
nodetool netstats # No active streaming

Critical Constraints

One operation at a time: Multiple concurrent topology changes must not be performed. The cluster must complete one operation before starting another.

Avoid bootstrapping multiple nodes simultaneously to reduce streaming load. Concurrent bootstraps are supported but increase resource contention.

Cleanup must run after adding nodes. Existing nodes retain data they no longer own until cleanup executes.


GoalOperation
Remove node permanentlyDecommission
Move node to different hardwareDecommissionAdd Node
Replace with same IPReplace Node (faster)
ScenarioOperation
Node recoverable (disk/network issue)Fix issue, node rejoins automatically
Node unrecoverable, data on other replicasRemove Node
Node unrecoverable, need same token rangeReplace Node
Remove stuck in gossipAssassinate (last resort)
GoalOperation
Increase capacityScale Up (add nodes)
Decrease capacityScale Down (decommission nodes)
Add geographic redundancyAdd Datacenter
Consolidate datacentersRemove Datacenter

All topology changes except assassinate involve data streaming between nodes.

OperationData Flows FromData Flows To
Add nodeExisting nodesNew node
DecommissionDeparting nodeRemaining nodes
Remove nodeRemaining replicasOther replicas
Replace nodeRemaining replicasReplacement node
RebuildSource datacenterTarget datacenter

Streaming duration depends on data volume and network bandwidth:

Data Volume1 Gbps Network10 Gbps Network
100 GB15-30 min5-10 min
500 GB1-2 hours15-30 min
1 TB2-4 hours30-60 min
5 TB12-24 hours2-4 hours

Streaming Throughput

Default streaming throughput is 200 Mbps. This may be increased for faster operations:

Terminal window
nodetool setstreamthroughput 400 # MB/s

Higher values increase operation speed but may impact client request latency.


Terminal window
# Cluster membership status
nodetool status
# Streaming progress
nodetool netstats
# Detailed streaming sessions
nodetool netstats -H
# Node state transitions
nodetool gossipinfo | grep STATUS
StateCodeMeaning
NormalUNFully operational
JoiningUJBootstrap in progress
LeavingULDecommission in progress
MovingUMToken move in progress
DownDNNode unreachable
# Streaming progress
org.apache.cassandra.metrics:type=Streaming,scope=*,name=*
# Compaction (impacts streaming)
org.apache.cassandra.metrics:type=Compaction,name=PendingTasks

OperationIf InterruptedRecovery
BootstrapNode partially populatedClear data, restart bootstrap
DecommissionNode partially drainedCannot resume; complete manually or restore
RemovePartial redistributionRe-run removenode
ReplaceReplacement partially populatedClear data, restart replacement

If streaming fails during an operation:

  1. Check network connectivity between nodes
  2. Verify disk space on source and target
  3. Review system.log for specific errors
  4. Increase streaming_socket_timeout_in_ms if timeouts occur
# cassandra.yaml - increase for large partitions
streaming_socket_timeout_in_ms: 86400000 # 24 hours