Skip to content

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

Scheduling nodetool Commands Across Clusters

nodetool operates on a single node. In production Cassandra deployments spanning multiple nodes, datacenters, and racks, most operational tasks require executing nodetool commands across every node in a coordinated sequence. Manual orchestration introduces significant operational risk.


nodetool connects to one Cassandra node at a time via JMX. A command like nodetool repair -pr only affects the node where it is executed. Achieving cluster-wide coverage requires repeating the command on every node — in the correct order, with appropriate health verification between steps.

RiskConsequence
Executing on too many nodes simultaneouslyLoss of quorum availability; potential data unavailability
Skipping a nodeIncomplete repair; risk of data resurrection from missed tombstone propagation
No health verification between stepsCascading failures if a node does not recover before proceeding
Ignoring rack/datacenter topologyMultiple replicas for the same data taken offline simultaneously
No error handlingSilent failures leave the cluster in an inconsistent maintenance state
No audit trailImpossible to verify what ran, when, and whether it succeeded
Script interruptionNo way to resume from where the operation stopped

Coordination Requirements Vary by Operation

Section titled “Coordination Requirements Vary by Operation”

Different nodetool commands have different safety constraints:

OperationConstraint
repair -prMust run on every node within gc_grace_seconds; may parallelize on non-overlapping ranges
cleanupMust run on every existing node after topology change; sequential recommended
compactAvoid concurrent execution on nodes sharing replicas
upgradesstablesMust run on every node after version upgrade; sequential
drain + restartRolling: one node at a time with health gates between steps
decommissionSingle node; verify cluster health before and after
flushSafe to run concurrently
setcompactionthroughputApply to all nodes; safe to run concurrently

Clusters spanning multiple datacenters introduce additional constraints:

  • Some operations should complete in the local datacenter before proceeding to remote datacenters
  • Rack awareness is required to avoid taking down multiple replicas for the same token range
  • Different datacenters may have different maintenance windows
  • Coordination state must persist across long-running operations that span hours or days

AxonOps Operations provides purpose-built orchestration for nodetool commands across Cassandra clusters, with native understanding of Cassandra topology, health, and operational constraints.

AxonOps understands the cluster topology — nodes, racks, datacenters, and token ownership — and uses this to coordinate command execution safely:

  • Rack-aware rolling: Only one node per rack is affected at a time, maintaining quorum availability
  • Datacenter ordering: Operations complete in one datacenter before proceeding to the next
  • Token-range awareness: For operations like repair, coordination is based on token ownership to avoid redundant work

Each step in a rolling operation is gated by cluster health checks:

  • Verify all expected nodes are in UN (Up/Normal) state before proceeding
  • Check that pending compaction backlog is below threshold
  • Monitor streaming activity from previous steps
  • Configurable stabilization wait time between nodes

Operations can be scheduled to run automatically:

  • Recurring schedules: Repair cycles, routine maintenance
  • Maintenance windows: Restrict execution to off-peak hours
  • Dependency chains: Flush before snapshot, repair after topology change
  • Adaptive timing: Adjust execution speed based on cluster load
  • Real-time progress visibility across all nodes
  • Persistent state — if interrupted, operations resume from where they stopped
  • Complete audit log of every command executed, on which node, with output and exit status
  • Alerting on failures with configurable retry policies
OperationAxonOps Orchestration
RepairAdaptive scheduling with gc_grace_seconds compliance
Rolling restartDrain, restart, health-gate per node with rack awareness
CleanupTriggered automatically after topology changes
Compaction tuningApply throughput changes across all nodes
Schema changesVerify schema agreement after each change
UpgradesCoordinated rolling upgrade with version verification