InfraMaxx

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.

Start with the first lesson

All 40 lessons

  1. LinearizabilityBeginner · 4 min

    Linearizability makes operations appear atomic in an order that respects their real-time completion.

  2. Eventual consistencyBeginner · 4 min

    Eventual consistency permits replicas to converge asynchronously.

  3. QuorumBeginner · 4 min

    Quorum requires responses from enough replicas to make a decision.

  4. Split brainBeginner · 4 min

    Split brain has conflicting leaders for the same authority.

  5. Raft leaderBeginner · 4 min

    Raft leader coordinates replicated state machine proposals.

  6. LeaseBeginner · 4 min

    Lease grants time-bounded authority to an owner.

  7. Fencing tokenBeginner · 4 min

    Fencing token monotonically identifies ownership epochs.

  8. Distributed lockBeginner · 5 min

    Distributed lock coordinates concurrent access to a shared resource.

  9. At-least-onceBeginner · 4 min

    At-least-once delivers messages one or more times.

  10. At-most-onceBeginner · 4 min

    At-most-once may drop messages but avoids redelivery.

  11. Exactly-once effectBeginner · 4 min

    Exactly-once effect requires end-to-end atomicity or deduplication.

  12. BackpressureBeginner · 4 min

    Backpressure propagates downstream saturation to upstream producers.

  13. Consistent hashingBeginner · 4 min

    Consistent hashing maps keys across a changing set of nodes.

  14. Lamport clockBeginner · 4 min

    Lamport clock orders events consistent with happened-before.

  15. Vector clockBeginner · 4 min

    Vector clock tracks partial causal order of events.

  16. 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.

  17. 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.

  18. 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…

  19. 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.

  20. 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.

  21. 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…

  22. 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…

  23. 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.

  24. 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.

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

  26. 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.

  27. 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…

  28. 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…

  29. 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.

  30. 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.

  31. 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.

  32. 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.

  33. 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.

  34. 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…

  35. 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…

  36. 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…

  37. 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…

  38. 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…

  39. 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.

  40. 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…