Track
Distributed Systems lessons
40 short lessons on Distributed Systems. Each one starts from a real situation, shows how it works, and ends with a quiz. Free to read.
All 40 lessons
- LinearizabilityBeginner · 4 min
Linearizability makes operations appear atomic in an order that respects their real-time completion.
- Eventual consistencyBeginner · 4 min
Eventual consistency permits replicas to converge asynchronously.
- QuorumBeginner · 4 min
Quorum requires responses from enough replicas to make a decision.
- Split brainBeginner · 4 min
Split brain has conflicting leaders for the same authority.
- Raft leaderBeginner · 4 min
Raft leader coordinates replicated state machine proposals.
- LeaseBeginner · 4 min
Lease grants time-bounded authority to an owner.
- Fencing tokenBeginner · 4 min
Fencing token monotonically identifies ownership epochs.
- Distributed lockBeginner · 5 min
Distributed lock coordinates concurrent access to a shared resource.
- At-least-onceBeginner · 4 min
At-least-once delivers messages one or more times.
- At-most-onceBeginner · 4 min
At-most-once may drop messages but avoids redelivery.
- Exactly-once effectBeginner · 4 min
Exactly-once effect requires end-to-end atomicity or deduplication.
- BackpressureBeginner · 4 min
Backpressure propagates downstream saturation to upstream producers.
- Consistent hashingBeginner · 4 min
Consistent hashing maps keys across a changing set of nodes.
- Lamport clockBeginner · 4 min
Lamport clock orders events consistent with happened-before.
- Vector clockBeginner · 4 min
Vector clock tracks partial causal order of events.
- Failure modelsBeginner · 5 min
Explain what a failure model says, why crash-stop, crash-recovery and Byzantine assumptions differ, and why gray failure needs its own place in the model.
- Partial failuresIntermediate · 5 min
Explain why a timed-out remote call has an unknown outcome, and how timeouts, idempotency keys, retries and jittered backoff work together to handle it safely.
- Network partitionsIntermediate · 5 min
Explain how a network partition splits a cluster into groups, why only the side with a majority can commit writes, and how to choose member counts that survive a zone…
- CAP tradeoffsIntermediate · 5 min
Explain the three CAP properties, why a partition forces a choice between refusing and serving stale answers, and how to make that choice for each operation.
- Sequential consistencyIntermediate · 5 min
Explain sequential consistency, where all processes agree on one order that keeps each process's own order, and how it differs from the real-time rule of linearizability.
- Lamport clocksIntermediate · 4 min
Explain Lamport's happened-before relation and the logical clock rule that places causes before effects across machines, without relying on synchronized wall-clock time…
- Vector clocksIntermediate · 5 min
Explain vector clocks, how an entry-by-entry comparison shows whether two versions are ancestors or concurrent, and why concurrent versions must be merged rather than…
- Leader electionIntermediate · 4 min
Explain leader election in Raft, where terms and majority votes allow at most one leader per term, and why a paused old leader still needs a check before it writes.
- Raft logsIntermediate · 5 min
Explain Raft log entries, how a majority commit makes an entry survive a leader change, and why an uncommitted entry can be overwritten, so clients must retry safely.
- Quorum reads and writesAdvanced · 4 min
Explain quorum reads and writes, how R plus W greater than N makes a read overlap the latest acknowledged write, and why that guarantee covers one key only.
- Split brain preventionAdvanced · 5 min
Explain how split brain happens when two nodes each take over during a partition, and how a majority rule, a witness and fencing prevent two active owners.
- Fencing tokensAdvanced · 4 min
Explain fencing tokens, where a resource rejects writes carrying an older token, and why a lock alone cannot stop a paused holder from writing after its lease has…
- LeasesAdvanced · 4 min
Explain leases as time-limited rights that holders renew, how Kubernetes uses Lease objects for node heartbeats and leader election, and why a delayed renewal looks…
- Idempotency keysAdvanced · 4 min
Explain idempotency keys, where the client creates one key per logical operation so a server can return the first result when a request is retried after a timeout.
- At least once deliveryAdvanced · 4 min
Explain at-least-once delivery, why a queue can deliver the same message twice after a lost acknowledgement or a slow handler, and how consumers handle duplicates safely.
- Outbox patternsAdvanced · 4 min
Explain the outbox pattern, where a service writes an event row in the same local transaction as its business change, so the event exists only when the change commits.
- Saga orchestrationAdvanced · 4 min
Explain saga orchestration, where a coordinator runs local steps and compensates completed steps in reverse order, and why its workflow state must be stored durably.
- Distributed transactionsAdvanced · 4 min
Explain two-phase commit, where participants prepare and a coordinator decides, and why prepared transactions hold locks and can block when the coordinator fails.
- Two phase commitAdvanced · 4 min
Two-phase commit lets several databases commit or abort together. A yes vote binds each participant, which is why a coordinator failure can leave locks held until a…
- CRDT merge rulesAdvanced · 4 min
CRDTs let replicas update independently and merge later without a coordinator. The merge rule decides which change wins, and a timestamp-based rule can silently drop a…
- Gossip membershipAdvanced · 4 min
Gossip membership spreads liveness news between random peers. SWIM detects failures with indirect probes and spreads changes on existing messages, trading detection…
- Backpressure propagationAdvanced · 4 min
Backpressure lets a slow consumer slow its producer by signaling demand upstream. Without a bound on the buffer between stages, the surplus turns into memory growth…
- FLP impossibilityAdvanced · 4 min
The FLP result says no deterministic consensus protocol can guarantee agreement in an asynchronous system if one process may crash. Practical systems keep safety and…
- Leases: failure analysisAdvanced · 4 min
A lease grants a role for a limited time, but a paused holder can act after the grant has moved on. Fencing tokens let the storage layer reject writes from stale holders.
- Idempotency keys: operational verificationAdvanced · 4 min
An idempotency key lets a server recognize a repeated request and return the saved result instead of running the operation again. The key must identify one logical…