./blog
Field notes on consensus, storage engines, replication, and the sharp edges of building systems that don't lose your data.
A Field Guide to Raft
Consensus is not a black box labeled "just use Raft." Here are the parts that actually bite — terms, commit rules, and the invariants you only learn about at 3am.
LSM-Trees vs B-Trees, Honestly
Write amplification, read amplification, space amplification — you only get to optimize two. A practical guide to picking a storage engine without the vendor hand-waving.
The Hidden Cost of Distributed Transactions
Two-phase commit feels free in the happy path. Then a coordinator dies mid-prepare and you learn exactly what "blocking protocol" means.
Building an Idempotent Write Path
Retries are inevitable, so exactly-once is a lie you implement with idempotency keys. A pattern for making duplicate writes boring.
Debugging Replication Lag at 3AM
A war story about a replica that fell an hour behind, the single long transaction that caused it, and the dashboard that should have caught it.
Vector Clocks Without the Hand-Waving
Happens-before, concurrency, and conflict detection explained with a worked example instead of a wall of subscripts.