Apache Cassandra

Tombstones & TTL

Understand how Cassandra handles deletes and expirations via tombstones, and the operational risks of tombstone accumulation.

Because Cassandra's storage engine is append-only (SSTables are immutable once written), a DELETE statement can't simply remove bytes from disk immediately. Instead, Cassandra writes a special marker called a tombstone that indicates a row or column has been deleted. Tombstones are replicated and read like any other write, and are only physically purged from disk during compaction, after a configurable grace period.

A tombstone is like sticking a 'DELETED' Post-it note over an entry in an old, unerasable ledger rather than tearing out the page — the note has to stay long enough for every branch office with a copy of the ledger to see it and cross out their own entry, before you're allowed to eventually shred that page.

Key Concepts

1
TTL (Time To Live) is a related mechanism where data is written with an expiration time; once the TTL elapses, the data automatically becomes an expired cell, which is functionally treated as a tombstone. TTLs are commonly used for time-series data, session data, or caching layers where old data should disappear automatically without an explicit delete.
TTL (Time To Live)expired cell
2
The gc_grace_seconds table setting (default 10 days) controls how long a tombstone is retained before it can be permanently removed during compaction. This grace period exists to ensure that tombstones have enough time to propagate to all replicas via repair before being purged — deleting a tombstone too early risks a scenario called zombie data, where a replica that missed the delete resurrects the old value during a later repair or read.
`gc_grace_seconds`zombie datagc_grace_seconds
3
Excessive tombstone accumulation is one of the most common Cassandra performance problems, since reads must scan past tombstones to find live data, and a partition with many tombstones can cause severe read latency or even query timeouts (tombstone_failure_threshold).
tombstone_failure_threshold