Resource Exhaustion: The Missing Capacity That Stops the Work
A program borrows a database connection to read or save information, then returns it for another job. Suppose it keeps borrowing connections but fails to return them. Eventually a new job can't get a connection, even though the server is still running.
That is one route to resource exhaustion: a system lacks enough of a needed resource to handle its work. The scarce resource might be processing time, working memory, storage, network capacity or a pool of available connections.
Not every component has to reach its limit. One bottleneck can make a service slow, cause requests to fail or prevent legitimate users from getting work done. That affects availability, the ability to use a system when it is needed.
What Actually Happens During a DDoS Attack?
A resource has a working life
Software allocates resources, uses them and releases them when the work is finished. A connection pool, for example, keeps a limited collection of connections that jobs can borrow and return.
In the opening example, the problem isn't necessarily a surge of visitors. It is missing cleanup. Each forgotten release leaves less capacity for the next job.
MITRE describes this pattern as failure to release a resource after its useful life. Cleanup needs to happen when work completes normally and when an error interrupts it.
A restart might free the accumulated resources, but the same faulty code can start consuming them again. Repairing the release behavior addresses the cause of the leak.
Demand and deliberate abuse
Legitimate demand can also exceed capacity even when cleanup works correctly. If work arrives faster than the service can finish it, waiting jobs build up or new work must be refused.
An attacker can deliberately create that pressure to cause a denial of service. A large traffic flood is one method, but exhausting a resource doesn't always require a large number of requests.
MITRE's uncontrolled resource-consumption entry covers the consequences of failing to limit scarce resources. The visible slowdown alone doesn't reveal whether the cause is ordinary demand, a defect or intentional abuse.
Finding the constrained resource is therefore more informative than treating every high-load alarm as the same problem.
- Stay online through short outages with battery power for your router and computer.
- Save your work and shut down cleanly instead of losing it to a flicker.
- Charge your phone from the built-in USB port even while the power is out.
One request can contain a lot of work
Suppose a service accepts jobs to resize images. One request might ask for a single small image; another might bundle a large amount of processing. Counting both as “one request” hides the difference in their cost.
The Open Worldwide Application Security Project, or OWASP, discusses this problem in its resource-consumption guidance for application programming interfaces. These interfaces, called APIs, let software request work from other software.
A rate limit controls how frequently requests are accepted. Input limits cap the data a request accepts, while work limits bound the operations it can trigger. A timeout sets a deadline for work or waiting; a resource quota caps how much a client or program may use. Which limit helps depends on what is running out.
Adding cloud capacity can absorb some additional demand, but without appropriate limits it can also turn expensive or abusive work into a larger bill. More capacity and controlled consumption solve different parts of the problem.
Leave room for work that can finish
Accepting every new job can make overload worse. A growing queue itself consumes resources, while users wait for work the service may be unable to complete.
Google's operational guidance on handling overload describes controlling admission and reducing service when necessary. Rejecting some work deliberately can preserve capacity for useful work already in progress.
Fork Bombs: When a Computer Runs Out of Room to Run Programs

SYN Floods Fill the Space Where Connections Wait

Cryptojacking: When Someone Else Uses Your Computing Power

QUOTE:
"Amateurs hack systems, professionals hack people."
