Distributed Systems

When nodes fail and networks partition, consensus becomes hard. These lessons visualize the protocols that keep distributed systems consistent.

01
RAFT
Leader election by majority vote
L320 MIN
02
PAXOS
Consensus in two phases
L320 MIN
03
CAP THEOREM
Pick two (but you must pick P)
L215 MIN
04
VECTOR CLOCKS
Causal ordering without a global clock
L215 MIN
05
TWO-PHASE COMMIT
All or nothing, but the coordinator can block everyone
L215 MIN
06
GOSSIP PROTOCOL
Epidemic dissemination in O(log N) rounds
L214 MIN
07
SPLIT BRAIN
Two leaders, one disaster
L215 MIN
08
FAILURE MODELS & TIMEOUTS
You cannot tell a dead node from a slow one
L114 MIN
09
Replication Lag
You wrote it, but the replica hasn't heard yet
L214 MIN
10
LEASES & FENCING TOKENS
A lock the holder is sure it still has
L215 MIN
11
PACELC & CONSISTENCY MODELS
Even with no partition, you pay latency for consistency
L215 MIN
12
IDEMPOTENCY & EXACTLY-ONCE
At-least-once delivery plus an idempotent handler is as good as it gets
L215 MIN
13
CAPSTONE: REPLICATED KV UNDER PARTITION
Everything in this path, in one three-node store
L320 MIN
14
WEBHOOK DELIVERY
Late, twice, out of order, and sometimes not from them
L216 MIN