Cassandra Architecture Compaction Fundamentals
Storage-engine internals, LSM-tree mechanics, compaction strategies, token-ring distribution, gossip, repair, and tombstone lifecycle.
Production-grade playbooks for tuning compaction, scheduling repair, and automating node lifecycles in Apache Cassandra 4.x / 5.x.
Compaction Strategy is a focused, no-fluff resource for the teams who keep Cassandra clusters healthy under load. Every guide is anchored in real operational constraints: I/O backpressure, repair cadence, tombstone lifecycles, gossip convergence, and the disk-headroom math that decides whether a strategy change is safe to ship.
The material is organized into three tracks. Architecture & Fundamentals covers
the storage engine itself — LSM-tree mechanics, STCS vs LCS vs TWCS, token-ring distribution,
gossip and failure detection, read-repair vs anti-entropy repair, consistency-level tuning, and
tombstone garbage collection. Tuning & Monitoring turns that theory into
operations: backlog alerting thresholds, async compaction metrics, error categorization,
read-path fallback routing, automated repair scheduling, and Python pipelines that wrap
nodetool and JMX safely. Node Lifecycle Automation closes the loop
with safe node bootstrap, decommission, dead-node replacement, rolling restarts and upgrades,
and token allocation and rebalancing.
Code samples are idempotent, bounded, and written for automation pipelines rather than one-off shells — exactly what you need to operate multi-datacenter clusters within strict SLA boundaries.
Three tracks, from storage-engine internals to production automation. Pick a section to dive in.
Storage-engine internals, LSM-tree mechanics, compaction strategies, token-ring distribution, gossip, repair, and tombstone lifecycle.
Strategy tuning, backlog alerting, async metrics, error categorization, read-path fallback routing, and Python automation pipelines.
Bootstrap, decommission, replace, and roll nodes safely — plus token allocation, rebalancing, and state-aware repair scheduling.
The most-used playbooks — hand-picked walkthroughs that span storage internals and day-two operations.
Compare the three core compaction strategies and learn which workload each one is built for.
A safe, staged migration path from size-tiered to leveled compaction with disk-headroom math.
Diagnose and drain a runaway compaction backlog while keeping the cluster serving reads.
Tune compaction throughput against I/O headroom without starving the read path.
Wrap nodetool and JMX in idempotent Python pipelines for real-time compaction telemetry.
Configure time-window compaction for high-volume IoT and sensor time-series ingestion.
The full node-lifecycle playbook: bootstrap, decommission, replace, and roll nodes with production guardrails.
Replace a permanently dead node in place so the replacement inherits the same token ownership.
Schedule anti-entropy repair the safe way — state-aware, staggered, and aligned to gc_grace_seconds.