Load shedding
Why an overloaded server that accepts everything ends up serving no one, and how to reject early, bound queues by deadline and choose what to drop.
25 min7 steps
By the end you can
- Explain why goodput collapses when a server queues work it cannot finish before clients give up
- Compute how much load to shed and the deepest queue that can still meet a deadline
- Choose what to shed and where, using priority, cheap early rejection, LIFO or CoDel-style queues and client-side throttling
Throughput is not goodput
- 80% load: throughput80 %
- 80% load: goodput80 %
- 150% load: throughput100 %
- 150% load: goodput3 %
How fast the cliff arrives
10% overload
about 10 s
50% overload
about 2 s
Wait
queue / service rate
Loading question…
Shed the excess, cheaply and early
Loading question…
Bound the queue by the deadline
Max useful depth
rate x deadline
deeper work finishes too late
Better
bound by time
or drop expired on dequeue
Loading question…
Choose what to drop
Criticality
- Shed sheddable first
- Checkout over prefetch
Controlled delay
- CoDel-inspired
- Shrink queue timeout when not draining
Adaptive LIFO
- Serve newest in overload
- Their clients still wait
Shed at the client, too
Reject probability
(req - K x accepts) / (req + 1)
1,000 sent, 300 accepted
about 40%
rejected locally
Check your mastery, then overload a service
Big queue
Latency climbs, throughput flat
Cap queue
Compare goodput
Score 80% or more. In the sandbox, give a service a large queue and drive a traffic spike above capacity, then cap the queue.
Mastery check
5 questions on fresh variants. One attempt each, no time limit. Score 80% or more to master the lesson.
Answer this step to continue.