You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 30e299e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/content/articles/backpressure-load-shedding-admission-control-overload/index.mdx
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ I watched an e-commerce platform collapse during a flash sale. Traffic spiked to
24
24
25
25
The fix wasn't more capacity. It was teaching the system to say "no."
26
26
27
-
Most systems don't fail because they can't handle load. They fail because they try to handle _all_ the load. Without explicit overload handling, a system accepts work it cannot complete, queues grow unbounded, and what starts as a traffic spike becomes a prolonged outage.
27
+
<Highlighter>Most systems don't fail because they can't handle load.</Highlighter> They fail because they try to handle _all_ the load. Without explicit overload handling, a system accepts work it cannot complete, queues grow unbounded, and what starts as a traffic spike becomes a prolonged outage.
28
28
29
29
<Callouttype="warning">
30
30
A system without backpressure will accept work until it collapses. The goal isn't handling unlimited load — it's handling your design capacity reliably and degrading gracefully beyond it.
@@ -38,6 +38,7 @@ Overload doesn't just make systems slow — it makes them _worse_. There's a vic
38
38
39
39
<Diagram
40
40
src={cascadingFailureDiagram}
41
+
size="2xl"
41
42
title="The cascading failure loop where overload compounds itself through retries and resource exhaustion"
42
43
description="Flowchart showing the feedback loop that turns overload into a full outage. A Traffic Spike leads to Queue Growth, which leads to Latency Increase. Increased latency causes Client Timeouts, which trigger Client Retries, sending more traffic back into the original spike and reinforcing the cycle. A second branch from Latency Increase leads to Resource Exhaustion, then Thread Pool Saturation, then Connection Pool Exhaustion, and finally Complete Failure. The diagram shows both the retry feedback loop and the internal resource collapse path that make overloaded systems degrade rapidly rather than recover naturally."
43
44
/>
@@ -61,7 +62,7 @@ Consider a system processing 100 RPS with 200ms latency — that's 20 requests i
61
62
Here's a counterintuitive truth: throughput can _increase_ during overload while your system becomes effectively useless. The distinction is between throughput (work attempted) and goodput (work successfully completed).
62
63
63
64
<Table
64
-
variant="vertical-column-delineation-table"
65
+
variant="report-table"
65
66
content={{
66
67
figure: "Throughput can increase during overload while goodput collapses.",
@@ -94,6 +95,8 @@ This is the key insight: if you'd simply rejected 1,000 of those 2,000 requests
94
95
95
96
Think of admission control like a nightclub bouncer. The bouncer's job isn't to throw people out after they're inside causing trouble — it's to decide at the door who gets in. If the club is at capacity, new arrivals wait outside. The people inside have a good experience.
96
97
98
+
<Newsletter />
99
+
97
100
Admission control works the same way: decide _upfront_ whether to accept work, rather than accepting everything and failing later. A request rejected at the door costs almost nothing. A request that gets halfway through your system before timing out has consumed database connections, CPU cycles, and memory — resources that could have served requests you _could_ complete.
98
101
99
102
Here's how that flow looks in practice:
@@ -113,7 +116,7 @@ It's better to reject 20% of requests immediately than to accept 100% and fail 4
113
116
I've found four approaches cover most scenarios:
114
117
115
118
<List
116
-
variant="check-icons-list"
119
+
variant="card-grid-list"
117
120
items={[
118
121
{
119
122
lead: "Rate limiting:",
@@ -134,6 +137,8 @@ I've found four approaches cover most scenarios:
134
137
]}
135
138
/>
136
139
140
+
Of these, latency-based admission gives you the tightest feedback loop. Here's how it works as Express middleware:
The key insight is that critical traffic can _borrow_ capacity from lower tiers. If the anonymous quota is exhausted but the critical quota has room, anonymous requests are rejected while payments keep flowing.
227
232
228
-
<Newsletter />
229
-
230
233
## Load Shedding and Graceful Degradation
231
234
232
235
### Choosing What to Shed
233
236
234
237
Load shedding is the deliberate dropping of work to preserve system stability. It sounds brutal, but the alternative is worse. When you're drowning, you throw cargo overboard to keep the ship afloat.
235
238
236
239
<Table
237
-
variant="vertical-column-delineation-table"
240
+
variant="grid-and-accent-header-table"
238
241
content={{
239
242
figure: "Load shedding strategies and their tradeoffs.",
240
243
thead: { th: ["Strategy", "When to Use", "Tradeoff"] },
0 commit comments