Skip to main content

Storage Engine Internals

This section walks through every layer of the storage engine, from the moment a write arrives to how it eventually lands on S3 and gets read back. Each page builds on the previous one.

LayerWhat it does
Composite KeyThe encoding that underpins every data structure
WALSegment-based durability with group commit
MemtableIn-memory skip list with arena allocator
SSTableImmutable sorted files on S3
ManifestSingle source of truth for live SSTables, CAS coordination
Flush PipelineFrozen memtable → SSTable → S3
CompactionLeveled merge across L0–L3
CacheThree-tier W-TinyLFU with continuity tracking
S3 Storage LayerObject layout, leases, large values, GC
Data FlowEnd-to-end write, read, and recovery paths