I took the simulated pipeline from Shed your load and rebuilt it as a real distributed system (browser clients, a Go frontend, a Redis queue, a Go backend). I hit it with an eight-second load spike, watched it collapse, and then did what any on-call engineer would do: I cleared the queue. Goodput came back for about one second. Then it collapsed again.
TL;DR: a short spike plus clients that retry on timeout gives you a collapse that outlives its cause: throughput pinned at 80 ops/s, goodput at zero, and a queue growing by about 280 items a second for as long as you care to watch. Flushing the queue doesn’t fix it, because the retry loop that sustains the collapse runs in the clients. What fixes it is refusing the work you can’t finish: backpressure at the front door and load shedding at the backend. With a 429 the client honors, the same spike leaves the queue at 66 items instead of 11,900. A backend slowdown is the same failure as a load spike, and it is where a static limit stops being enough.
Here is the collapse. Every recording below is the system’s own dashboard:

Blue is throughput, green is goodput. The spike ends at t = 13 s and nothing improves. Overload failure modes are hard to believe until you watch one, which is why this post is mostly moving pictures, and why the whole thing is deployed for you to break yourself.
How these were recorded. Each GIF is one run of the stock system, cropped to the metric cards and the two main charts, with a caption strip I added on top. They play at 2× speed; the clock in the corner is real seconds.
This is a real system, not a simulation, so absolute numbers wobble from run to run. The shapes don’t.
The system: every arrow is a network hop
It’s a classic distributed system: clients, a frontend, a queue and a backend, each in its own process.
| |
- Clients are Web Workers in your browser issuing real RPCs. It’s the
long-running-operation pattern:
StartWorkreturns an operation ID, and the client pollsGetOperationevery 250 ms until it’s done or its one-second deadline passes. - The Go frontend admits or rejects work, pushes it onto a Redis list, and learns about completions over pub/sub.
- The Go backend is a pool of 4 workers, 50 ms of simulated work each. So capacity is 4 ÷ 50 ms = 80 ops/s.
The page you open is the client tier, the control panel and the dashboard at once. Every visitor gets an isolated system with its own queue and its own 80 ops/s. The instance admits 20 of those at a time; visitor 21 gets a 503 and a waiting page, which is this post’s advice applied to its own demo.
Healthy baseline: two numbers, measured in different places
Two numbers matter, and they are measured in different places on purpose:
- Throughput: work the backend completes per second.
- Goodput: requests that succeed from the client’s point of view. The answer arrived while the client was still waiting for it.

At 60 requests/s against 80 ops/s of capacity (75% utilisation) they’re the same line and the queue is empty. Boring, correct, and no hint of what’s one click away.
Retry storm: the spike ends, the outage doesn’t
Now the same system with one change on the client: when an attempt times out, start over, immediately, up to five more times. Then a load spike: 4× the baseline, 240 requests/s, three times what the backend can do, for 8 seconds.

During the spike the queue fills, waits cross the one-second deadline, and goodput falls to zero. That much is ordinary overload. The part that matters is what happens after t = 13 s, when load is back to 60 requests/s, comfortably under capacity:
- Throughput: 80 ops/s. The backend is flat out and, by its own metrics, healthy.
- Goodput: 0.
- Queue: 2,745 items when the spike ends, 11,910 at t = 46 s. That is 278 items a second, and it never slows.
The arithmetic is short. Every timed-out attempt is abandoned, and the retry is
a brand-new StartWork: new operation, new item in the queue. This is the
client’s loop, with the metrics calls trimmed out:
| |
Sixty requests a second, each making six one-second attempts once nothing succeeds, is 360 attempts/s offered to an 80 ops/s backend. 360 in and 80 out predicts a queue growing by 280 a second. The recording shows 278.
The queue is FIFO, so the backend spends all 80 ops/s on attempts whose clients moved on long ago. That is a stable state. So is the healthy one. The system has two, and the spike’s only job was to push it from one to the other.
This is a metastable failure in the sense of Bronson et al. (HotOS ‘21): a trigger (the spike) and a sustaining loop (the retries). The trigger is gone and the system stays dead.
The on-call instinct: clear the queue
You’re paged. The dashboard shows a five-digit queue, and almost everything in it is work nobody is waiting for. The instinct is to throw the backlog away and let the system start fresh. The demo has a button for exactly that.

At t = 26 s the queue goes from 6,400 to zero. Goodput comes back at 76 ops/s for about one second. A second and a half after the flush the queue is at 270. At four seconds it’s at 660. By t = 51 s it’s at 6,351, right back where I found it.
Here’s what happened. A client polls an operation only until its one-second deadline. So of the 6,400 operations in that queue, the only ones with a client still attached were the ones started in the last second: about 360 of them, the attempt rate times the deadline. The other 6,000 had already been abandoned. Deleting them took nothing away from any client, and changed nothing about what any client would do next.
The 360 live attempts are the part that matters. Their next poll, at most 250 ms later, returned 404 because the operation no longer existed, and every client with retries left did what the client code says to do when an attempt fails: start a new one. The recording agrees. 1.5 s after the flush the queue held 270 items and the backend had served about 120 more, so roughly 390 operations had arrived in a window where new requests account for 90. The other 300 were reissues.
The backend could finish 80 of those inside a one-second deadline, which is the one-second burst of goodput. The rest timed out and retried, and the system was back to 360 attempts/s against 80 ops/s.
The collapse doesn’t live in the server’s queue. It lives in the clients’ retry loop. The queue is where it becomes visible. A flush resets the backlog and leaves the attempt rate where it was, and the attempt rate is the thing the backend can’t keep up with.
Tell clients no
The fix has to break the loop, and the loop runs through the clients. So the
frontend gets an in-flight quota: once 70 operations are admitted and
unfinished, a new StartWork is rejected on the spot with a 429.
| |
Two things make this work. The rejection is cheap: one Redis read, no queue
slot, no worker time. And the client treats 429 as backpressure, which is the
result === "shed" branch above. A timeout says “maybe try again”. A 429 says
“stop”.
That second property carries most of the result, and it holds here because I wrote the client. A production client often answers a 429 by retrying after a backoff, and you rarely control every client. I come back to that below.
Same spike, same retry-happy clients, quota on from the start:

| During the spike | No quota | In-flight quota = 70 |
|---|---|---|
| Goodput (ops/s) | 0 | ~78 (capacity is 80) |
| Refused with a 429 (requests/s) | 0 | ~170 |
| Queue (items) | 2,745 at spike end, then +278/s | pinned at 66 |
| After the spike | collapsed indefinitely | back to normal in ~5 s |
The queue sits at 66 and not 70 because in-flight also counts the four operations the workers are holding.
Why 70? At 80 ops/s, 70 operations is 875 ms of work, which leaves about 125 ms of the clients’ one-second deadline as headroom. Everything admitted gets served in time.
The price is that about 170 of the 240 requests arriving each second during the spike are told no: seven in ten. That is still a far better price than the alternative, where everyone was told no anyway, slowly, after a timeout, and then came back to ask again.
Turning it on mid-collapse: the quota counts the dead
The harder test: let the system collapse, then enable the quota.

I expected goodput to snap back. It doesn’t, and the reason is instructive. The storm stops almost immediately: RPC traffic drops from around 1,500 a second to 60 within two seconds, because every retry loop that hits a 429 exits. The sustaining loop is broken.
But there are still 5,700 dead operations in the queue, and every one of them counts as in-flight. In-flight is far above 70, so every new request is rejected too. The backlog drains at 80 ops/s. Left alone, that’s another 70 seconds of serving nobody.
Now clear the queue. This time it sticks: goodput is back at 63 ops/s, which is all of the offered load, within two seconds, and it stays there.
So clearing the queue wasn’t wrong. It was the second step, and I’d done it first. Flush the backlog while the retry loop is live and the clients rebuild it in seconds. Break the loop first and the flush is what ends the incident.
Load shedding at the backend: deadline + margin
Backpressure is the frontend’s cure. The backend’s is load shedding, the fix Shed your load ended on: propagate the client’s deadline into the work item, and drop anything the backend can’t finish in time instead of discovering the waste after doing it.
| |
How the deadline reaches the backend matters once the hops are real. The client
does not send a timestamp. It sends the time it has left, as a
Request-Timeout-Ms: 1000 header on StartWork, and the frontend turns that
into an absolute deadline on its own clock before the item goes onto the queue.
The backend then compares that deadline against its own clock.
A browser’s clock can be off by far more than a 70 ms margin, and a deadline
stamped by it would have the backend refusing the wrong work. The frontend and
backend clocks are mine to keep in sync. The browsers’ are not. gRPC makes the
same choice for the same reason: grpc-timeout carries a duration, and each
server derives its own deadline from it. A request with no header has no
deadline, also as in gRPC.
The price is that the frontend’s deadline runs late by however long the request spent in transit, which is one more thing the margin has to cover.
Same spike and the same retrying clients as every run above, with no quota at the front door:

The difference from the quota is who finds out. A 429 tells the client. A dropped item tells nobody, so its client waits out the deadline and retries, and the retry storm still forms.
What changes is what the backend does with the storm. Dropping doomed work costs almost nothing, so the workers spend their time only on requests that can still succeed. Nothing older than about 930 ms survives in the queue, so it holds at most one deadline’s worth of arrivals instead of growing without bound. Once the spike ends, the retries run out instead of sustaining themselves.
Goodput dips harder than it did behind the quota: as low as 28 ops/s during the spike, and 7 ops/s for one second right after it. The queue peaks at 578 items and is empty again about 15 seconds after the spike ends. But the system recovers on its own, which the unprotected system never does. The simulation’s result survives contact with real RPCs, Redis and polling clients.
A slowdown is a load spike
Everything so far was triggered by more load. The other button on the panel leaves the load alone and makes the backend’s work take 4× longer, 200 ms instead of 50 ms, for the same 8 seconds. A bad deploy, a slow dependency, a noisy neighbour, a GC pause that got out of hand. Clients keep sending their ordinary 60 requests/s throughout.

It’s the same picture. Throughput sags to under 20 ops/s while the backend is slow, then returns to 80. Goodput goes to zero and stays there. The queue passes 9,000 and keeps going. The slowdown lasted eight seconds and the outage is permanent.
It’s the same picture because it’s the same event. Capacity is workers ÷ latency:
| Load | Capacity | Load ÷ capacity | |
|---|---|---|---|
| Healthy | 60/s | 4 ÷ 50 ms = 80/s | 0.75 |
| Load spike 4× | 240/s | 80/s | 3.0 |
| Latency spike 4× | 60/s | 4 ÷ 200 ms = 20/s | 3.0 |
A slowdown cuts capacity, and normal load measured against the reduced capacity is a spike. The queue can’t tell whether the numerator went up or the denominator went down, and neither can the retry loop. Same trigger, same sustaining loop, same metastable state. So there’s nothing special to build for “slow dependency” incidents, and predictable traffic doesn’t excuse you from overload protection.
A static limit is an assumption about capacity
There is one real difference, and it’s in the cures. Here’s the same slowdown with the in-flight quota of 70 that handled the load spike so well:

The good news: no collapse. Three seconds after the slowdown ends, the system is healthy again, with no operator involved.
The bad news: during the slowdown, goodput is zero anyway. The quota of 70 was 875 ms of work at 80 ops/s. At 20 ops/s, 70 operations is three and a half seconds of work, so everything the frontend admits is already doomed.
Deadline + margin has the same blind spot: a 70 ms margin was derived from 50 ms of work, and now the work takes 200 ms, so the backend starts jobs it cannot finish.
Both limits are static, and a static limit is an assumption about capacity written down as a constant. A slowdown is precisely the event that falsifies the assumption. Re-derive the constants for the reduced capacity (a quota of 15, or a margin of 250 ms) and goodput through the slowdown is about 20 ops/s, which is all the capacity there is.
So the honest scorecard for static limits is this. They reliably remove the metastability: the outage ends when the trigger does. They preserve goodput during the event only if the event leaves their assumption intact. Closing that gap means limits that follow measured capacity instead of configured capacity, which is its own post.
A cure at every layer
Step back and the same disease has a treatment at each tier, and each one works by refusing something:
| Layer | Mechanism | What it refuses | In the demo |
|---|---|---|---|
| Client | Honor 429; cap retries; backoff + jitter | To turn one request into six | Retry strategy, max retries |
| Frontend | In-flight quota or max QPS, answered with 429 | Work the system has no room for, before it costs anything | “Shed & survive” |
| Backend | Deadline + margin; LIFO | Work that can’t finish in time | “Deadline + margin” |
They aren’t alternatives. The backend can’t stop clients from retrying, the frontend can’t know how long a specific job will take, and the client can’t see the queue.
The first row is the one you’re least likely to own. Backpressure broke the storm here because my client stops on a 429, and in production you often don’t control every client. That is the argument for retry budgets and backoff living in the shared client library, and for the server-side cures existing regardless.
The takeaway
A queue between clients and a backend is a promise to do work later. Under overload, whether load went up or capacity went down, it becomes a promise the system can’t keep, made to clients who respond to broken promises by asking again. Clearing the queue breaks the promises without telling anyone. Telling clients no is the same refusal, delivered early, cheaply, and in a form they can act on.
And measure goodput where it’s observed: in the client. Through every collapse above, the backend’s throughput graph was flat, busy and reassuring.
Reproduce it
The fastest way is the live instance. Four of the runs above are one-click presets in the top row: Healthy baseline, Retry storm → collapse, Shed & survive and Deadline + margin. The others take a few clicks, listed below. Or run the whole stack locally:
| |
- Failed fix: click Retry storm → collapse, wait for the spike to end, and click Clear queue.
- Live rescue: mid-collapse, set Shed mode to In-flight quota and the quota to 70, watch the storm stop, then click Clear queue.
- Slowdown: click Healthy baseline, set Retry to Immediate and Max retries to 5, then click Spike latency 4×.
- Slowdown with a quota: the same, with Shed mode set to In-flight quota and the quota at 70 before the latency spike.
Still on the panel and not covered here: long-tail latency, LIFO, a bounded queue, and exponential backoff with and without jitter. Source is on GitHub.