Load Shedding

Load Shedding

Load shedding refers to a technique in which an overloaded system deliberately drops or rejects a portion of incoming requests in order to prevent a total failure. It is a controlled partial sacrifice so that the rest of the system keeps running stably.

A server – that is, a computer that answers requests from the internet – can only handle a certain amount of work at once. If ten times as many requests as usual suddenly arrive, it risks failing completely. Load shedding is the countermeasure: the system deliberately rejects a portion of the requests before it collapses. It’s better to reliably answer seventy percent of requests than to collapse while trying to answer one hundred percent for everyone. The term originally comes from electrical engineering, where power utilities disconnect entire districts from the grid during overload to prevent a widespread blackout.

Why a controlled partial loss is better than a total failure

If an overloaded server doesn’t shed load, its performance degrades for everyone at once. Requests pile up, wait times explode, and eventually the system stops responding altogether. This state is called a cascading failure – a system collapse that spreads like a chain reaction and often drags several connected services down with it.

Load shedding breaks this chain. Anyone who is rejected gets a clear error message right away. This may sound worse at first, but it isn’t: a quick rejection is more predictable for the user than waiting forever with no result. What matters to the operator is that the core of the system remains stable and that the situation can recover once the surge subsides.

How a system decides what to discard

The simplest method is a hard threshold: as soon as more than a certain number of requests are open at the same time, new ones are rejected across the board. This works, but it’s crude. Smarter systems prioritize: a request involving a paying customer or one that is security-critical is favored, while simple background tasks are the first to be dropped.

Modern services measure in real time how long an average request is currently taking. If this value rises above a defined threshold, the system automatically begins shedding load. If it falls again, the system accepts more requests. This control loop runs fully automatically, without anyone intervening manually. Some systems also combine load shedding with a queue: instead of rejecting a request immediately, it is briefly parked – if capacity frees up within a few seconds, it is processed after all.

There is also a softer variant called degraded mode: the system answers all requests, but with reduced effort. A news portal, for example, might forgo personalized recommendations and instead show all users the same default view. This way, the service remains reachable even if it is no longer fully functional.

Load shedding in AI services and tech products

In AI services, load shedding is especially relevant because a single request to a large language model – that is, a model like the ones behind chatbots – costs significantly more computing power than a simple website visit. If such a service goes viral or a news story attracts many users at the same time, the load can multiply within minutes.

In practice, load shedding is often encountered as an error message with the HTTP status code 429 – “Too Many Requests.” APIs, i.e. programming interfaces that give other services access to AI models, send this code when a user or an application makes too many requests at once. Developers must build their programs to respond to this code and retry after a short pause.

Gaming platforms, ticket marketplaces, and streaming services also use load shedding. When a popular concert goes on sale or a new season of a series launches, millions of requests arrive within seconds. Load shedding then decides who gets through immediately, who is placed in a queue, and who is turned away – keeping the service running for everyone else.

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.