Distributed Systems Theory
Consensus, CRDTs, clocks, consistent hashing. The theory.
- Modules
- 11
- Hours
- 5
- Difficulty
- Intermediate to Advanced
- 3.0intermediate
Consensus Protocols: How Distributed Systems Agree
Raft and Multi-Paxos explained: leader election, log replication, safety under term numbers, and why etcd, Consul, and CockroachDB picked Raft.
- 3.1advanced
Consistency Deep Dive: Linearizability, Serializability, and the Spectrum Between
Linearizability vs serializability vs causal vs eventual, external consistency, and how to reason precisely about what your database actually gives you.
- 3.2intermediate
Quorums and Replication: The Math of R + W > N
Read and write quorums, Dynamo-style replication, sloppy quorums, hinted handoff, and when quorums give you linearizability (and when they do not).
- 3.3intermediate
CAP and PACELC: The Tradeoff That Keeps Confusing People
What CAP actually says (and what it doesn't), the three big misconceptions, and how PACELC fixes the omission of latency.
- 3.4advanced
Clocks and Ordering: Lamport, Vector, and Hybrid Logical Clocks
Why wall-clock time lies, happens-before, Lamport clocks, vector clocks, hybrid logical clocks, and Google TrueTime.
- 3.5advanced
CRDTs: Conflict-Free Replicated Data Types
State-based (CvRDT) and op-based (CmRDT) CRDTs, G-Counter, PN-Counter, OR-Set, LWW-Register, and how Yjs, Automerge, Figma, and Redis use them.
- 3.6advanced
Distributed Transactions: 2PC, Saga, and When to Avoid Both
Two-phase commit, Percolator, Sagas, outbox pattern, and the honest answer to distributed transactions: don't, or pay the price.
- 3.7intermediate
Idempotency and Exactly-Once: The Honest Truth About Delivery Guarantees
Why exactly-once delivery is a myth, how idempotency keys make at-least-once feel exactly-once, and how Stripe and Kafka implement it.
- 3.8intermediate
Failure Detection: Deciding a Node Is Dead
Heartbeats, phi-accrual detectors, gossip (SWIM), and why 'is it dead or just slow?' has no correct answer.
- 3.9intermediate
Consistent Hashing: Keys to Nodes Without Global Reshuffles
The hash ring, virtual nodes, bounded-load variant, rendezvous hashing, Maglev, and jump hash for distributing keys across dynamic node sets.
- 3.10advanced
Merkle Trees and Anti-Entropy: Keeping Replicas in Sync Cheaply
Merkle trees, anti-entropy protocols, read repair, hinted handoff, and how Dynamo, Cassandra, and Git use hashed trees to find the differences.