Distributed Systems#
A deep dive into the theory and practice of distributed systems — the algorithms, consistency models, and failure modes that underpin every large-scale system. This path focuses on the foundational concepts that are often hand-waved in higher-level system design discussions.
Prerequisites#
This path assumes familiarity with:
- System Design fundamentals (load balancing, caching, microservices) — covered in the System Design path
- CAP theorem — covered in Databases: NoSQL
- Event sourcing & CQRS — covered in Software Architecture: Event-Driven Architecture
- Circuit breaker, retry & bulkhead patterns — covered in System Design: Reliability & Resilience
Sections#
| # | Section | Topics |
|---|---|---|
| 1 | Distributed Systems Fundamentals | Why distribution is hard, fallacies of distributed computing, network partitions, partial failures, FLP impossibility, system models |
| 2 | Time & Ordering | Physical clocks, clock skew, Lamport clocks, vector clocks, hybrid logical clocks, happens-before, causal ordering |
| 3 | Consistency Models | Linearizability, sequential consistency, causal consistency, eventual consistency, strong eventual consistency, session guarantees |
| 4 | Consensus Algorithms | Paxos, Multi-Paxos, Raft, Viewstamped Replication, ZAB, practical comparison |
| 5 | Replication | Single-leader, multi-leader, leaderless quorum, read-your-writes, monotonic reads, chain replication, conflict resolution |
| 6 | Partitioning & Sharding | Range partitioning, hash partitioning, consistent hashing, rebalancing, secondary indexes, hot spots |
| 7 | Distributed Transactions | Two-phase commit, three-phase commit, distributed locking, Calvin, Spanner TrueTime, transaction coordinators |
| 8 | CRDTs & Eventual Consistency | State-based vs operation-based CRDTs, G-Counter, PN-Counter, OR-Set, LWW-Register, Merkle trees, anti-entropy |
| 9 | Failure Detection & Recovery | Heartbeats, phi accrual detector, gossip protocols, SWIM, membership protocols, read repair, hinted handoff |
| 10 | Case Studies | Dynamo, Spanner, Kafka, CockroachDB, Cassandra, etcd — architecture decisions and tradeoffs |