What is Cassandra's write path?

Answer

Cassandra's write path is optimized for high throughput. When a write arrives at a coordinator node: 1. Commit Log: the mutation is appended to the commit log on disk (sequential write — fast). This ensures durability — if Cassandra crashes, the commit log is replayed on startup. 2. MemTable: the mutation is also written to an in-memory data structure called the MemTable, organized by table. The write is acknowledged to the client at this point (when the consistency level is met). 3. SSTable flush: when the MemTable reaches a size threshold, it is flushed to disk as an immutable SSTable (Sorted String Table) file. 4. Compaction: background process merges and removes stale SSTables. Key insight: Cassandra never updates or deletes data in-place — writes are always appends (to commit log and MemTable). Updates create new versions; deletes create tombstones. This makes Cassandra extremely fast for writes — all I/O is sequential appends, which are optimal for disk.