Distributed Systems Deep Dive
For engineers who want consensus, replication and consistency in their bones.
The hard core of distributed systems, threaded from the CAP theorem through Raft, quorums, vector clocks and CRDTs to real designs. Each protocol is paired with a simulator to drive it and a challenge to implement one step of it yourself.
- Reason precisely about consensus, replication and consistency
- Implement Raft election, vector clocks and CRDT merges
- Tune quorums and predict the consistency/availability they buy
- Recognize the failure modes before they page you
CAP Theorem & Consistency Models
The impossibility result that frames everything.
CP vs AP Databases
What CAP means when you actually pick a database.
Partitioning, Sharding & Replication
Split data, replicate it, keep it consistent.
Consensus, Transactions & Coordination
Getting nodes to agree — the core problem.
Raft vs Paxos
The two consensus protocols, compared.
Raft: The Election
Drive a Raft cluster through elections and failures.
Raft Leader Election (Majority)
Implement one step of the Raft election.
The Quorum Dial
Tune N/R/W and watch consistency vs availability move.
Quorum (N/R/W) Explorer
Compute quorum overlap for any N/R/W.
Concurrency, Locks & Isolation Levels
Locks, races, and the cost of coordination.
Vector Clock Merge
Order events without a global clock.
Vector Clocks: Who Caused What
See causality captured by vector clocks.
CRDT: Grow-Only Counter
Merge conflicting replicas that always converge.
CRDT Merge: No Conflict
Watch two divergent replicas reconcile, no coordinator.
The Rumor Mill: Gossip
Spread state epidemically — anti-entropy gossip.
Consistent Hashing Ring
Implement the ring that shards and rebalances.
Consistent Hashing Visualizer
Visualize rebalancing when a node joins or leaves.
Design a Distributed Lock
A lock that survives node death.
Design an ID Generator
Unique IDs without coordination.
Design a Key-Value Store
Assemble it all into a replicated KV store.