Watch systems work. Then watch them break.
An animated field guide to system design: 57 lessons on 7 lines, and 9 real systems to build. Each is a live simulation on one screen. See the problem, cause the failure, switch on the fix.
Requests flow from Users through the balancer to three servers.
- Response timetarget ≤ 400 ms
- 400 ms
- Cache hits
- 80%
- Failed
- 0%
The route
Lines are topics; zones are levels. Ride the recommended path from N1, or jump to any station. A dimmed one is best after another.
Networking0 of 16 visited
- N1A request and a response
- N2Acknowledgements
- N3Latency vs bandwidth
- N4Handshakes and keep-alive
- N5DNS: finding the server
- N6Windows and flow control
- N7Long polling, SSE and WebSockets
- N8Timeouts and deadline propagation
- N9Congestion control
- N10Head-of-line blocking and multiplexing
- N11L4 vs L7: balancers, proxies, gateways
- N12Heartbeats and keepalives
- N13Pipelining and batching
- N14At-most-once, at-least-once, exactly-once
- N15Backpressure
- N16Nearest region and failover
Short on time? The interview fast lane
- F1 Latency & throughput
- F2 Scaling up vs scaling out
- F3 Load balancing
- F4 Health checks & failover
- C1 Caching
- C2 Content delivery networks
- C3 Expiry & stale data
- C4 Cache stampede
- D2 Read replicas
- D3 Sharding
- D4 Consistent hashing
- D7 Consistency vs availability
- D8 Quorum reads and writes
- D10 Locks and double booking
- A1 Message queues
- A2 Publish / subscribe
- A3 Retries & backoff
- A4 Idempotency keys
- A5 Poison messages and dead-letter queues
- R1 Rate limiting
- R2 Circuit breakers
- R3 Autoscaling
- R4 Load shedding and priority
Journeys
Real systems, built up stage by stage under growing traffic and failures. Each one rides several lines.
How to read a scene
Every scene draws a request the same seven ways. Shape and colour both carry the state, so a scene reads without colour too.
Request. On its way, or waiting its turn.
Running late. Past the latency target and still going.
Answered. Heading back to the user with a good result.
Stale answer. Answered, but with out-of-date data.
Turned away. Refused fast on purpose: rate-limited or a fallback.
Failed. An error. Dropped requests fall off the stage.
Gave up. The user timed out. The work may still be running.