KV Store Cheat Sheet
Key concepts, trade-offs, and quick-reference notes for your interview prep.
LSM Write Path: WAL, Memtable, SSTable
#1💡 Say the path in order: WAL for durability, memtable for speed, SSTable for persistence, compaction for hygiene.
Quorum Math: R + W > N
#2💡 W = N kills availability: one slow replica blocks every write. W = 2 is the Dynamo compromise.
Ring Placement: 256 Vnodes, 1/N Remap
#3💡 Same ring as the consistent-hashing topic; the KV store adds the preference list on top.
LWW vs Vector Clocks: Who Wins After a Partition
#4💡 The concrete failure: a cart item vanishes with no error. Name clock skew as the mechanism.
Sloppy Quorums and Hinted Handoff
#5💡 Hinted handoff is a temporary durability patch, not replication. Anti-entropy covers anything older than the hint TTL.
Three Repair Mechanisms, Three Time Horizons
#6💡 "Eventually consistent" is vague until you name the three mechanisms and their horizons.
Bloom Filters: 10 Bits/Key, 1% False Positives
#7💡 Bloom filters answer membership only: they do nothing for range scans.
Compaction Strategies and Write Amplification
#8💡 Monitor pending compactions and SSTables-per-read: they degrade before p99 does.
Capacity Math: From Ops/sec to Node Count
#9💡 Size by the binding constraint: here write throughput (500 nodes), not storage (150).
The Metrics That Predict Trouble
#10💡 Compaction debt degrades reads cluster-wide before any single metric pages. Watch the leading indicators.