Load shedding: rejecting work on purpose
coreintermediateLoad shedding is the deliberate decision to reject some incoming work when a system does not have the capacity to handle everything arriving at it, rather than trying to accept and process everything and letting quality degrade uniformly (or collapse entirely) under the overload. The counter-intuitive part is that rejecting a controlled fraction of requests can produce a far better overall outcome than accepting all of them: a system that tries to serve 100% of requests at 300% of its capacity typically ends up serving close to 0% successfully, because queues grow unboundedly, latency climbs until clients time out anyway, and resource contention (thread pools, connections, memory) grinds every request to a halt including the ones that would have succeeded fine on their own. A system that instead sheds the excess — say, rejecting the top 60% of requests immediately with a fast, cheap "try again later" response — keeps the remaining 40% running at full, healthy speed. The total number of successfully-served requests is often much higher with shedding than without it, because the alternative to "reject 60% cleanly" is not "serve 100% slowly," it is "serve close to 0% because the system fell over."
Think of it as
A lifeboat rated for 50 people that tries to take on 80 sinks and saves nobody; a lifeboat that turns away the last 30 and stays at its rated capacity saves 50. Load shedding is the crew member at the boarding point making the hard, deliberate call to turn people away once the boat is full, rather than letting everyone climb aboard and watching the boat go under with everyone still on it. The number who get turned away (30) is a real, visible cost — but it is a far smaller cost than the alternative, and it is a cost paid on purpose, by someone making a decision, rather than an accident that happens to everyone including the 50 who would otherwise have been fine.
What we're doing: Compare total successful throughput for a service rated at 1,000 req/s receiving 3,000 req/s, with and without shedding.
- 9
- This is the collapse this concept opened with: the unshed system does not serve a degraded-but-reasonable fraction of the 3,000 req/s, it serves almost none of it, because the queue and retry storm consume capacity that would otherwise have gone toward completing requests.
- 14
- The shedding system serves roughly its full rated capacity, because the rejected 2,000 req/s never entered the queue or consumed processing resources at all — the fast, cheap rejection is what keeps the accepted work isolated from the excess.
Why this works: The comparison is not "1,000 served vs. 3,000 served at lower quality" — it is "1,000 served vs. ~80 served," which is the actual, counter-intuitive result overload testing repeatedly finds: past a certain point, trying to serve more work than a system can handle serves less total work than deliberately refusing the excess.
Making a rejected request expensive to reject
Wrong
Better
What you see: A load-shedding mechanism is added, but the system still collapses under overload, because the rejection path itself writes to the same database connection pool that the accepted requests are competing for — the "cheap" rejection turned out to consume real, contended capacity.
Why: The entire value of load shedding depends on the rejection being genuinely cheap — if rejecting a request costs nearly as much as processing one, shedding does not actually free up the capacity it is supposed to protect, and the system can still saturate even while nominally "shedding" load.
- Accept everything
- Queue depth grows without bound
- Latency climbs until clients time out anyway
- Resource contention slows every request, including ones that would have succeeded alone
- Successful throughput can collapse toward zero
- Shed the excess
- Requests beyond capacity are rejected immediately, cheaply
- The accepted fraction runs at full, healthy latency
- No queue growth, no resource contention spiral
- Total successful throughput is often much higher
Accepting everything vs. shedding under 3x overload
Remember: Under severe overload, accepting everything usually collapses successful throughput toward zero, because queueing, contention and retries compound — deliberately rejecting the excess (fast and cheaply) keeps the accepted fraction running at full health, and often produces far higher total successful throughput than trying to serve everyone. A rejection has to genuinely be cheap to reject, or shedding does not actually relieve the pressure it is meant to.
See also: mechanisms priorities quotas admission control · mitigating cascading failures · what is backpressure

