Skip to main content
Articles/cassandra/cassandra-write-path-tombstone-gotchas
Scenario Article

Cassandra Write Path & Tombstone Gotchas

Why deletes in Cassandra create tombstones that can degrade read latency, and how LSM-tree flushes work.

Abstract Algorithmsβ€’Jul 29, 2026
XLinkedInReddit
Cassandra Write Path & Tombstone Gotchas
πŸ’‘ Executive Summary

Cassandra turns deletes into special markers called tombstones.

🎯 System Scenario & Requirements

System Goal

Cassandra turns deletes into special markers called tombstones.

Actors & Components

  • Volatile Memory
  • Persistent Storage
  • Memtable (Sorted RAM)
  • CommitLog (Append Only)
  • SSTable (Immutable Disk)

Functional Requirements

  • Cassandra turns deletes into special markers called tombstones.
  • Excessive deletes lead to heavy tombstone scanning and GC stalls during reads.
  • In Apache Cassandra, write operations avoid expensive random disk I/O by executing sequential appends.

Constraints & Assumptions

  • When a read query executes, the Cassandra coordinator must scan across multiple SSTables on disk and merge the latest values while filtering out tombstoned entries: The Tombstone Pitfall: If your workload generates frequent updates, row deletions, or rapid TTL expirations on high-volume tables, read queries must scan through thousands of tombstone markers.
  • This causes sudden CPU spikes, triggers TombstoneOverloadedException , and causes severe JVM stop-the-world garbage collection pauses.

⚑ Execution Stages & Decision Trace

1

Stage 1 β€” The Solution & Trade-offs

Action / Decision:

When a read query executes, the Cassandra coordinator must scan across multiple SSTables on disk and merge the latest values while filtering out tombstoned entries: The Tombstone Pitfall: If your workload generates frequent updates, row deletions, or rapid TTL expirations on high-volume tables, read queries must scan through thousands of tombstone markers.

Component Behavior:

This causes sudden CPU spikes, triggers TombstoneOverloadedException , and causes severe JVM stop-the-world garbage collection pauses.

Observable Output: For time-series telemetry or logging workloads with automatic expiration, configure TimeWindowCompactionStrategy (TWCS) so entire SSTable files drop cleanly when their window expires without triggering tombstone scans.
Read Full Stage in Deep Dive ↓
πŸ“–

Deep Dive

Detailed Architectural Analysis

Deep Dive: Stage 1 β€” The Solution & Trade-offs

When a read query executes, the Cassandra coordinator must scan across multiple SSTables on disk and merge the latest values while filtering out tombstoned entries:

  • The Tombstone Pitfall: If your workload generates frequent updates, row deletions, or rapid TTL expirations on high-volume tables, read queries must scan through thousands of tombstone markers. This causes sudden CPU spikes, triggers TombstoneOverloadedException, and causes severe JVM stop-the-world garbage collection pauses.
  • Best Practice Solution: Avoid database anti-patterns that rely on frequent single-row updates or deletes. For time-series telemetry or logging workloads with automatic expiration, configure TimeWindowCompactionStrategy (TWCS) so entire SSTable files drop cleanly when their window expires without triggering tombstone scans.

Observable outcome: For time-series telemetry or logging workloads with automatic expiration, configure TimeWindowCompactionStrategy (TWCS) so entire SSTable files drop cleanly when their window expires without triggering tombstone scans.

πŸ“Š System Outcome & Trade-offs

End-to-End Result: The system enforces causal consistency and bounded operations across distributed nodes.

Observed User & Operator Behavior

User: Clients observe deterministic state without lost updates or race conditions.

Operator: Operators can verify stage outcomes against the scenario requirements.

Key Architectural Trade-offs

  • When a read query executes, the Cassandra coordinator must scan across multiple SSTables on disk and merge the latest values while filtering out tombstoned entries: The Tombstone Pitfall: If your workload generates frequent updates, row deletions, or rapid TTL expirations on high-volume tables, read queries must scan through thousands of tombstone markers.
  • This causes sudden CPU spikes, triggers TombstoneOverloadedException , and causes severe JVM stop-the-world garbage collection pauses.

⚠️ Failure Modes & Degraded Operation

The Solution & Trade-offs

When a read query executes, the Cassandra coordinator must scan across multiple SSTables on disk and merge the latest values while filtering out tombstoned entries: The Tombstone Pitfall: If your workload generates frequent updates, row deletions, or rapid TTL expirations on high-volume tables, read queries must scan through thousands of tombstone markers. This causes sudden CPU spikes, triggers TombstoneOverloadedException , and causes severe JVM stop-the-world garbage collection pauses. Best Practice Solution: Avoid database anti-patterns that rely on frequent single-row updates or deletes. For time-series telemetry or logging workloads with automatic expiration, configure TimeWindowCompactionStrategy (TWCS) so entire SSTable files drop cleanly when their window expires without triggering tombstone scans.

βœ…

Key learnings

  • When a read query executes, the Cassandra coordinator must scan across multiple SSTables on disk and merge the latest values while filtering out tombstoned entries: The Tombstone Pitfall: If your workload generates frequent updates, row deletions, or rapid TTL expirations on high-volume tables, read queries must scan through thousands of tombstone markers.
NEXT LEARNING STEPApply & Defend Decisions

Apply Concepts from this Scenario

Test your understanding of the architecture decisions and trade-offs presented in this case study.

Share this case study

Discuss architecture trade-offs and lessons with your team.

Share:XLinkedInReddit