Article series · 24 lessons
Distributed systems
Reason about services when networks are slow, machines fail and data must stay consistent.
Follow the sequence below, or pick up where you left off. Nothing is locked.
What you’ll work toward & your progress
What you’ll work toward
- Interpret HTTP messages, methods and conditional response semantics
- Separate cache freshness, validation, Vary and private data policies
- Explain protocol versions, session state and bounded retry contracts
- Design resources, domain actions, errors and compatible evolution
Completion is stored on this device only. Nothing is locked; start where it makes sense.
Before the first lesson
These are the starting lesson’s prerequisites, not requirements for every advanced topic below.
How to practise this subject
Write a short event history containing a crash, retry or delayed message. Explain the invariant, what each participant knows, and what evidence would distinguish safety from availability.
Lessons in order
- 01
HTTP Fundamentals — Verbs, Status Codes, Headers, Caching
Interpret HTTP messages, methods and conditional response semantics; Separate cache freshness, validation, Vary and private data policies; Explain protocol versions, session state and bounded retry contracts.
- 02
REST API Design — Resources, Versioning, Idempotency
Design resources, domain actions, errors and compatible evolution; Implement atomic operation replay and bounded total-order pagination; Describe OpenAPI, correct deprecation dates and patch semantics.
- 03
GraphQL — Schema, Resolvers, N+1, When to Pick It
Trace typed GraphQL execution, nullability and mutation ordering; Compare exact naive and batched lookup results with scoped authorisation; Bound queries and distinguish persisted documents from allowlists.
- 04
gRPC & Protobuf — When RPC Wins
Define RPC messages and four streaming shapes with explicit limits; Verify Protobuf bytes, presence and mixed-schema compatibility; Distinguish message framing, deadlines, cancellation and durable effects.
- 05
AuthN & AuthZ — OAuth 2.0, OIDC, JWT
Token validation is more than decoding. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 06
OS Basics — Processes, Threads, Memory, FDs
Processes, threads and resource accounting. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 07
Networking I — TCP/IP, DNS, Sockets
A reliable byte stream is not a durable message protocol. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 08
Networking II — Load Balancers L4 vs L7, Reverse Proxies
Balance work, drain connections and bound retries. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 09
Caching — Cache-Aside, Write-Through, TTLs, Invalidation
Cache-aside races and lease ownership. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 10
CDN — Edge, Cache Hierarchies, Cache-Control
Cache keys are isolation boundaries. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 11
CAP & PACELC — the Actual Trade-Offs
Reason from operation histories to CAP and PACELC, compare configured database contracts, and choose consistency for checkout.
- 12
Replication — Leader/Follower, Multi-Leader, Leaderless
Compare replication topologies, acknowledgment boundaries and lag; reason about quorum limits, session positions and fenced failover.
- 13
Consistency Models — Linearizable, Sequential, Eventual
Test consistency with precise operation histories, independent session guarantees and bounded Python checks; choose contracts by invariant.
- 14
Consensus — Paxos & Raft Intuition
Quorum intersection is necessary but protocol rules carry the value. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 15
Sharding & Partitioning Strategies
Choose hash, range or directory routing, measure movement and hot keys, and plan a versioned snapshot/stream migration with safe cutover.
- 16
Message Queues — SQS, RabbitMQ, Kafka as Queue
Separate delivery attempts from business effects; compare queue/log contracts, budget retries and build a bounded idempotent-consumer model.
- 17
Multi-Region — Active-Passive, Active-Active, Failover
Match regional data authority, spare capacity and DNS recovery to RTO/RPO objectives; work through loss, fencing and failback examples.
- 18
The 3 Pillars — Metrics, Logs, Traces
Signals answer questions only if context survives. A source-bounded lesson with worked reasoning, failure analysis and explicit runtime limitations.
- 19
Prometheus, Grafana, OpenTelemetry — Hands-on
Follow telemetry from instrumentation to queries and decisions: versioned stack wiring, weighted ratios, histogram semantics, dashboards and alert failure modes.
- 20
SLIs, SLOs & Error Budgets — the SRE Math
Define reliability in the right units, derive error budgets and burn rates, and test rolling-window alerts without confusing requests with downtime.
- 21
Incident Response — Runbooks, Postmortems, On-Call
Coordinate technical response and communications, choose safe mitigations, verify full recovery and turn evidence into accountable learning.
- 22
AuthN vs AuthZ, Sessions & Password Storage
Separate credential validation from permission decisions; reason about password storage, sessions, JWTs, revocation, tenant isolation and safe local tests.
- 23
TLS 1.3, PKI & Cert Lifecycle
Trace TLS 1.3 authentication and key agreement, inspect PKI trust boundaries, and operate certificate lifecycles without disabling verification.
- 24
OWASP Top 10, Secrets Mgmt & Threat Modelling
Use the OWASP Top 10:2021 as a bounded risk map, then test interpreter and access boundaries and design secrets, STRIDE and dependency controls.