What is a tombstone in Cassandra?

Answer

A tombstone in Cassandra is a special marker that represents a deleted row or column. Because Cassandra's data files (SSTables) are immutable, deletes cannot remove data in place. Instead, a tombstone is written — a record with the deleted cell's coordinates and a deletion timestamp. During reads, Cassandra merges data from multiple SSTables and the MemTable, and filters out tombstoned data. During compaction, tombstones are removed after the gc_grace_seconds period (default 10 days) — this grace period ensures that all nodes have propagated the delete before actually removing the tombstone. Tombstone problems: accumulating many tombstones causes read performance degradation (Cassandra must skip tombstones during reads). A query scanning thousands of tombstones can cause TombstoneOverwhelmingException. Mitigation: use TTL instead of explicit deletes when possible, design data models to avoid deleting frequently, tune gc_grace_seconds, and monitor tombstone counts.