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.