Design Overload Protection With Load Shedding
A service receives more traffic than it can handle: a viral event, a failed dependency that makes every request slow, or a retry storm after a blip. Design the protections that keep it serving as many useful requests as possible instead of collapsing, and explain how the whole call chain cooperates.
Cover how the service knows it is overloaded, which requests it rejects and how, what clients and upstream services do when rejected, and how you would test the design before an incident does.
Hints
Hint 1
An overloaded server with an unbounded queue spends its time on requests whose callers have already given up. Throughput of useful work falls to zero while the machine is busy.
Hint 2
Rejecting is cheap only if it happens before the expensive work. Decide at the door.
Hint 3
Not all requests are equal. Give each a criticality and shed from the bottom.
Asked at
Sign in to talk to the interviewer — ask what's in scope, what scale to design for, or for a nudge when you're stuck. Conversations save to your account.
Sign in to use the assistant — ask what the problem means, get a hint when you're stuck, or have your current work reviewed. Conversations save to your account.