Distributed Systems
These notes explain why the options in the system design hubs behave as they do. The hubs decide which pattern to use; these notes cover what the pattern assumes, what it can promise, and how to check that it keeps the promise.
flowchart LR
M[System models: what can fail] --> T[Time and order]
M --> G[Guarantees: what can be promised]
T --> C[Broadcast and consensus: agreeing]
G --> C
G --> A[Coordination avoidance: not agreeing]
C --> D[Distributed computation]
A --> D
V[Verification] -.checks.-> C
V -.checks.-> A
Notes
Mechanism notes:
The reading list has courses, books, papers, and verification resources.
Reading order
- System models first: every later guarantee holds only under a stated fault and timing model.
- Time and order, then guarantees: what order and visibility a client can be promised.
- Consensus and coordination avoidance together: the two answers to “must the replicas agree before acting?”
- Distributed computation applies these to work spread over many machines.
- Verification last, as the way to check a protocol built from the rest.
How it connects
- Data at scale: replication, partitioning, hashing, coordination services, and Dynamo-style stores appear as options in data at scale. The coordination section is the short version of the consensus and time notes.
- Consistency requirements: the requirement side, deciding what each operation needs, is in consistency. It links back here for the models and theorems.
- Across services: sagas and the transactional outbox in data across services are what replaces distributed transactions between services.
- Messaging: consumer-group rebalancing and task scheduling in messaging rely on leases, idempotency, and at-least-once delivery.
- Failure handling: containing failure covers timeouts and retries in callers; system models covers why a timeout cannot tell a slow node from a dead one.
- Control planes: Kubernetes keeps its state in etcd, a consensus store; see the control plane.
Library sources
- Vitillo 2021, Understanding Distributed Systems, Second Edition – part II, coordination, for most notes here
- Tornow 2025, Think Distributed Systems
- Kleppmann and Riccomini 2026, Designing Data-Intensive Applications, Second Edition – chapters 6-12
- Cachin et al. 2011, Introduction to Reliable and Secure Distributed Programming, Second Edition
- van Steen and Tanenbaum 2023, Distributed Systems, Fourth Edition
Further reading:
- Petrov 2019, Database Internals – part II, distributed systems
- Wattenhofer 2016, Principles of Distributed Computing – lecture notes on consensus, Byzantine agreement, and quorum systems