Part 3 of 11

Distributed Systems Theory

Consensus, CRDTs, clocks, consistent hashing. The theory.

Modules
11
Hours
5
Difficulty
Intermediate to Advanced
  1. 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.

    30 min etcdCockroachDBZooKeeper+1
  2. 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.

    25 min SpannerCockroachDBPostgreSQL+2
  3. 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).

    25 min CassandraDynamoDBScyllaDB
  4. 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.

    25 min CassandraDynamoDBMongoDB+5
  5. 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.

    30 min SpannerCockroachDBCassandra+2
  6. 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.

    25 min Redis
  7. 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.

    30 min SpannerCockroachDBKafka+3
  8. 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.

    25 min KafkaRedisSQS+1
  9. 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.

    25 min CassandraConsulRedis+3
  10. 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.

    25 min CassandraMemcachedEnvoy+3
  11. 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.

    25 min CassandraDynamoDB