Things I want to be able to explain cold.
Working notes on the distributed-systems problems that keep reappearing — written to be revised from, not read once. Each one leads with the diagrams and the mental model, then turns into a drill of questions with the answers folded away.
These are study notes, not project write-ups. They are about the topics themselves — how CDC works, why a hot partition resists the obvious fixes — rather than systems I shipped. The work I built is on the projects page, where four of the cards carry their own deep dives.
CDC, Debezium & the transactional outbox
How a committed row becomes a Kafka event without a dual write — WAL, logical decoding, replication slots, and why the real failure mode is a full database disk rather than a lost event.
read the notesPartitioning, rebalancing & hot partitions
The partition key is an ordering boundary, a load distribution and a scaling ceiling all at once. Why adding consumers, partitions or brokers never splits one hot key — and what actually does.
read the notesHot keys, cache stampedes & a likes LLD
Three different problems that all look like one hot key, and three fixes that do not transfer between them. Lua atomicity, lock leases, Dragonfly shard-threads, and a scalable likes design.
read the notesHot-write scaling: N, M and B
One counter maps to one slot on one primary, so more shards changes nothing. Separating per-entity skew from cluster capacity, with the skew math and a safe way to change bucket counts live.
read the notesRetry, recovery, idempotency & concurrency
A timeout is not a failure — it is an absence of information. Atomic claims, leases, idempotency versus locking, per-step state for multi-side-effect handlers, and where idempotency state should live.
read the notes