Lab · Reliability
Cascading failures
Checkout pages go from the web server to orders, then to stock. Home pages need the web server only. Slow the stock service down, watch the slowdown reach pages that never call it, then try the defences.
Try it
- Users — 6 checkouts a second — healthy — 4 home/s · wait 3 s
- Web server — 40 workers — healthy — 3 busy · 0 waiting
- Orders service — 20 workers — healthy — 1 busy · 0 waiting
- Stock service — answers in 50 ms — healthy — Healthy
- Request/response
- Request
- Response
- Error / rejected
- Retry
Home pages on time
100%
Healthy: last 10 s · they never call stock
Checkouts on time
100%
Healthy: last 10 s
Web workers busy
3/ 40
0 pages waiting
Orders workers busy
1/ 20
0 calls waiting
Gave up waiting
0
timeouts are off
Refused at once
0
0 by the queue limit, 0 by the bulkhead
Calls per checkout
1.0
that reached stock, last 10 s
Wasted answers
0
work done after the caller gave up
Numbers add up:Home: 14 arrived = 13 on time + 0 failed + 0 timed out + 1 in progress · Checkout: 15 arrived = 12 on time + 0 failed + 0 timed out + 3 in progressThe lab checks this sum as it runs, so a counting mistake would show here.
Controls
Home pagesCheckouts
Show data table
| Time | Home pages | Checkouts |
|---|---|---|
| 1s | 100 | 100 |
| 1s | 100 | 100 |
| 2s | 100 | 100 |
| 2s | 100 | 100 |
| 3s | 100 | 100 |
| 3s | 100 | 100 |
Waiting at ordersWeb workers busy
Show data table
| Time | Waiting at orders | Web workers busy |
|---|---|---|
| 1s | 0 | 4 |
| 1s | 0 | 3 |
| 2s | 0 | 3 |
| 2s | 0 | 4 |
| 3s | 0 | 0 |
| 3s | 0 | 3 |
What just happened
Nothing yet. Start traffic or run an experiment.
What this model simplifies
- Each hop takes 100 ms, slowed so a request can be followed. Inside one data centre a hop takes well under 1 ms.
- Each worker handles one call at a time and waits for the whole call. Servers built on async code hold memory and connections instead of threads, and run out the same way.
- Users give up after exactly 3 s and never press reload. Real users reload, which adds more load.
- Stock has no limit on how many calls it works on at once. A real service would slow down further under the extra calls.
- Retries go out at once, with no backoff or jitter. The retries lab shows what those change.