A denial-of-service (DoS) attack works by overwhelming a target with more requests or data than its resources can handle, so legitimate users are denied service. The attacker does not break in; they consume the finite capacity of a network link, server, firewall, or application. A distributed DoS (DDoS) attack does the same thing from thousands of compromised devices at once, which is why it is the common form. Everything below explains why that consumption happens and what defenders actually do about it.

The core mechanism: exhausting a finite resource

Every service depends on resources that are limited and shared. A web server has a finite number of concurrent connections it can track. A network link has a fixed bandwidth in bits per second. A firewall or load balancer has a table of active sessions with a maximum size. An application has worker processes, database connection pools, and CPU cycles. A DoS attack is simply a strategy for driving one of those resources to its ceiling faster than the system can free it.

The key insight is that exhaustion is not always about raw volume. A volumetric attack floods a 10-gigabit link with 40 Gbps of junk traffic, and legitimate packets get dropped at the pipe. But a low-volume attack can be equally effective by targeting a structural bottleneck: the per-connection state a firewall keeps, the expensive query a database runs for each request, or the cryptographic handshake a server must compute.

To understand why this works, consider the TCP connection handshake. A client sends a SYN packet, the server replies with SYN-ACK, and the client answers with ACK to complete the connection. In a SYN flood, the attacker sends many SYNs with fake source addresses. The server allocates memory for each half-open connection and waits for a final ACK that never arrives. On older or unhardened systems, the backlog of half-open connections fills, and new legitimate connection attempts are refused. The attacker spends almost nothing; the server spends memory and time.

Application-layer attacks go after cost asymmetry more directly. A single HTTP request that triggers a complex database join or a large report generation can consume far more server work than the bandwidth it uses. The attacker finds the most expensive request and repeats it. The Resource Depletion model captures the general pattern: attacker cost stays low while defender cost per request stays high.

Distributed amplification: why scale changes everything

A single machine can rarely generate enough traffic to saturate a serious target. The distributed model solves this by recruiting a botnet: a network of infected computers, home routers, and IoT devices controlled remotely. With tens of thousands of hosts, the attacker aggregates modest per-host bandwidth into a flood that dwarfs any single connection.

Reflection and amplification attacks add another multiplier. The attacker spoofs the victim's IP address and sends a small query to a third-party service that replies with a much larger response to the victim. If a query of 60 bytes produces a 3,000-byte reply, the amplification factor is roughly 50x. Certain UDP-based protocols historically produced far larger factors, which is why they are abused and why operators disable them or add filtering. The attacker never needs the victim's bandwidth; they borrow the bandwidth of open resolvers and misconfigured servers.

The practical result: modest botnets can generate floods measured in hundreds of gigabits per second, and very large ones have been observed in the terabits per second range. You do not need to quote a specific dated peak to understand the mechanism. The asymmetry is the point. The attacker pays for a few thousand compromised devices and some spoofed packets; the victim pays for the bandwidth and the engineering to defend it.

Attack types side by side

Attack type Layer Target resource Typical signal Relative volume Main defense
Volumetric (UDP flood) L3/L4 Link bandwidth Inbound Gbps spike Very high Upstream scrubbing
SYN flood L3/L4 Connection table Half-open connections Low to medium SYN cookies, rate limits
DNS/NTP amplification L3/L4 Link bandwidth Spoofed source, large replies Very high BCP38, disable open recursion
HTTP flood L7 Worker processes, CPU Rising request rate, slow responses Low Caching, bot detection
Slowloris L7 Connection slots Many idle long-lived connections Very low Timeouts, connection caps
Algorithmic complexity L7 CPU per request High latency on specific endpoints Very low Input size limits, query tuning

The table shows why no single control stops everything. A scrubbing center that absorbs 500 Gbps of UDP traffic does nothing about a Slowloris attack that uses a few hundred connections. The defender must map controls to the layer being attacked.

Timeline: what a flood looks like from detection to recovery

Time Phase What happens What defenders see
T-0 Reconnaissance Attacker probes endpoints and measures response times Unusual scanning, odd request patterns
T+0 min Onset Traffic ramps in seconds to minutes Sudden bandwidth or request-rate spike
T+1-5 min Saturation Link or worker pool hits ceiling Latency climbs, errors appear, legitimate users time out
T+5-30 min Detection and escalation Monitoring fires, on-call engages Alerts, dashboards, customer reports
T+30-120 min Mitigation Traffic rerouted to scrubbing, filters applied Clean traffic separated from flood
T+2-24 h Sustainment Attack may shift vectors or persist New patterns as attacker adapts
T+24 h+ Recovery Attack subsides, capacity restored Traffic normalizes

The exact timing varies enormously, but the shape is consistent: attacks begin faster than humans can react, which is why automated detection and pre-arranged upstream mitigation matter more than heroic manual response.

The edge cases that break the simple story

Not every outage is a DoS attack, and not every DoS attack looks like a flood. A misconfigured load balancer can collapse under ordinary traffic. A viral post can look identical to an HTTP flood on a dashboard. The distinction matters because the response differs: a traffic spike from real users is a capacity problem, not a security incident, and blocking real users is harmful.

Some attacks are extremely quiet. A single crafted request that triggers pathological algorithmic behavior can pin a CPU core for seconds, and a few hundred such requests can bring down a service while consuming almost no bandwidth. These are hard to detect because the traffic volume is normal; only the server-side cost is abnormal.

The professional caveat: defenders often cannot distinguish attack traffic from legitimate traffic at the network edge, because both arrive on the same ports with plausible headers. Attackers increasingly mimic real browser behavior. The defense increasingly relies on behavioral signals and reputation rather than simple packet inspection, and that creates a false-positive problem where legitimate users get blocked alongside bots. Security teams call this the base-rate problem: at high request volume, even a low false-positive rate produces many wrongly blocked users. Any mitigation must balance dropping the attack against blocking real customers.

One counterintuitive detail: adding more servers does not always help. If the attack targets a shared resource, such as a single database or a shared authentication service, horizontal scaling of the web tier adds capacity while the bottleneck stays saturated. Defenders must identify the actual constrained resource before throwing hardware at the problem.

Red-flag warnings when evaluating any DoS claim or defense:

An outage with no traffic anomaly is probably not a DoS attack; check for application bugs or dependency failures first. A vendor promising to stop all attacks at any scale is overselling; mitigation is probabilistic and resource-bound. Blocking entire geographic regions to stop an attack will almost certainly block legitimate customers and is a last resort. Spoofed-source attacks cannot be fixed at the victim alone; they require upstream filtering and source validation. Scrambling to add capacity during an attack is usually too slow; pre-arranged mitigation capacity is what actually helps.

Practical actions with concrete thresholds

The right response depends on layer, but a small set of actions covers most cases.

First, pre-arrange mitigation capacity. Contract or configure upstream scrubbing before you need it, because provisioning during an attack takes far longer than the attack itself. Aim for headroom that exceeds your normal peak by a comfortable margin rather than matching it exactly.

Second, enable source validation and anti-spoofing on your own network. Ingress filtering (BCP38) prevents your systems from being used in reflection attacks and reduces the global pool of spoofable traffic. Disable open DNS resolvers, open NTP servers, and any UDP service that replies with more data than it receives.

Third, harden connection handling. Enable SYN cookies on servers, set connection timeouts measured in seconds rather than minutes, and cap the number of concurrent connections per source. For application-layer protection, cache aggressively, set input size limits, and tune expensive queries before attackers find them.

Fourth, instrument before you are attacked. Establish baseline traffic volume, request rates, error rates, and latency so you can recognize an anomaly quickly. Without a baseline, you cannot tell a flood from a busy day.

Fifth, define thresholds and escalation. For example, page on-call when inbound traffic exceeds a set multiple of the rolling baseline, when error rates exceed a defined percentage, or when connection counts approach a configured fraction of capacity. Pick numbers that fit your environment; the mechanism matters more than the exact figures.

Sixth, test the runbook. A mitigation plan that has never been exercised usually has gaps in authority, access, or timing. Tabletop exercises and controlled traffic tests reveal those gaps cheaply.

The common thread: DoS defense is preparation, not reaction. The attack lasts minutes; the mitigation contract, the filtering rules, and the baseline take weeks to build.

Limitations: what defenses can and cannot do

No defense eliminates DoS risk entirely. Any service with a finite resource can be exhausted by a sufficiently determined attacker with enough aggregate capacity. Defenses raise the cost and reduce the duration; they do not make the problem disappear. Mitigation providers themselves have upstream dependencies; if their capacity or routing is overwhelmed, your protection can degrade.

Detection is fundamentally incomplete. You can prepare for known patterns, but attackers adapt by shifting vectors and mimicking legitimate traffic. A defense that only recognizes yesterday's attack will miss tomorrow's. The most durable approach layers controls: source validation, rate limiting, caching, behavioral analysis, and upstream absorption, each covering a different failure mode.

Finally, the economics favor the attacker in many cases. Setting up a botnet and launching a flood costs little, while building and maintaining defense costs real money and engineering attention. That imbalance is why DoS attacks remain common despite years of mitigation tooling. Understanding the mechanism, from the TCP handshake upward, is what lets defenders make deliberate tradeoffs instead of reacting blindly.