Systems
Distributed Systems
What changes when a system runs on many machines: partial failure, the CAP and PACELC trade-offs, consistency models, logical clocks, consensus with Raft and Paxos, and distributed transactions.
3 modules 9 lessons ~1 h of reading
Start learning
0/9 completed
01
Foundations
3 lessons- 1Why Distributed Systems Are HardWhat makes distribution fundamentally different — partial failure, unreliable networks, unreliable clocks, no shared memory — the fallacies of distributed computing, failure models, and the two generals problem.intermediate4 min
- 2CAP & PACELCThe CAP theorem stated precisely — consistency, availability and partition tolerance — what it does and doesn't say, CP vs AP systems, the PACELC extension with latency trade-offs, and how real databases are classified.intermediate4 min
- 3Consistency ModelsThe spectrum of guarantees for replicated data — linearizability, sequential and causal consistency, session guarantees (read-your-writes, monotonic reads), and eventual consistency — with examples of anomalies each one prevents.advanced4 min
02
Time & Agreement
3 lessons- 4Clocks & OrderingWhy physical clocks can't order events across machines, NTP and clock skew, the happened-before relation, Lamport clocks, vector clocks, hybrid logical clocks, and TrueTime.advanced4 min
- 5Consensus & RaftGetting nodes to agree despite failures — the consensus problem, quorums, replicated state machines, and Raft in detail (leader election, log replication, safety, membership changes), plus Paxos and where consensus is used.advanced6 min
- 6Leader Election & CoordinationCoordinating distributed processes in practice — leader election with etcd and ZooKeeper, leases and fencing tokens, distributed locks (and why Redis locks are subtle), service discovery, configuration, and membership via gossip.advanced4 min
03
Data
3 lessons- 7Distributed TransactionsAtomic commits across multiple nodes or services — two-phase commit and its blocking problem, three-phase commit, consensus-backed commit (Spanner, CockroachDB), sagas with compensation, the outbox pattern, and idempotency.advanced5 min
- 8CRDTs & Eventual ConsistencyHandling concurrent updates without coordination — conflict resolution strategies, last-writer-wins pitfalls, CRDTs (G-Counter, PN-Counter, OR-Set, LWW-Register, sequence CRDTs), state vs operation-based CRDTs, anti-entropy, and local-first software.advanced4 min
- 9Stream ProcessingProcessing unbounded event streams — batch vs stream, event time vs processing time, windows and watermarks, stateful operators, exactly-once semantics, joins, change data capture, and the Kafka/Flink ecosystem.advanced4 min