An HTTP flood takes a site or API down with requests that look like real traffic, so the network looks healthy while the application, database or login service falls over. Volumetric defences that drop junk packets do little against well-formed HTTPS requests arriving over completed TLS handshakes from thousands of residential and cloud addresses. This guide is for network, web operations and SRE teams who need to recognise an application-layer (Layer 7) flood early and absorb it without locking out real users. It covers the signals that separate a flood from a traffic spike, rate limit design, caching and origin protection, bot signals, the split of roles between a web application firewall and a DDoS service, and how to run the response. It builds on the DDoS Protection Guide, which covers volumetric and protocol attacks, and stays at the level of defence: no attack tooling.
Key takeaways
- Layer 7 floods attack cost, not bandwidth. A modest request rate aimed at search, login, checkout or report endpoints can exhaust databases and worker pools long before links fill up.
- Know your baseline per route. Detection depends on knowing normal requests per second, cache hit ratio, error rate and latency for each expensive endpoint, not just total traffic.
- Design rate limits around identity and cost. Key limits on session, account, API key or token where you can, weight them by endpoint cost, and fall back to IP and network ranges only as a coarse layer.
- The origin must be unreachable except through the edge. A CDN or DDoS service is bypassed the moment an attacker finds the origin IP, so lock inbound traffic to provider ranges and keep the address out of DNS history and mail headers.
- Degrade on purpose. Prepared degraded modes (static pages, disabled search, logged-in only features, challenges on hot routes) keep the business running while mitigations are tuned.
How HTTP floods differ from volumetric attacks
MITRE ATT&CK separates network denial of service (T1498, which saturates bandwidth) from endpoint denial of service (T1499). Two T1499 sub-techniques describe what this guide covers: T1499.002 Service Exhaustion Flood, which targets the network service itself (web server, TLS stack), and T1499.003 Application Exhaustion Flood, which targets resource-heavy features of the application. The New Zealand NCSC describes application-layer attacks as trying "to crash a specific application, like a website, by flooding it with valid requests or a few carefully crafted malicious ones." OWASP files the API version of the weakness as API4:2023 Unrestricted Resource Consumption: an API that sets no limits on how much compute, memory, storage or paid third-party calls a client can trigger.
| Property | Volumetric and protocol floods | HTTP (Layer 7) floods |
|---|---|---|
| What runs out | Link bandwidth, router or firewall state tables | Web server workers, application threads, database connections, cache, third-party quotas |
| Traffic shape | Spoofed or reflected packets, often UDP or SYN | Completed TCP and TLS sessions sending valid HTTP requests |
| Where it is seen first | NetFlow, transit graphs, ISP alerts | Application latency, 5xx errors, database load, origin request rate |
| Who filters it best | ISP or cloud scrubbing, anycast edge | CDN or WAF edge with request inspection, plus the application itself |
Protocol-level abuse can blur the line. HTTP/2 Rapid Reset (CVE-2023-44487) let clients open and cancel streams rapidly to exhaust servers; CISA reported that it was exploited in the wild between August and October 2023 and advised applying vendor fixes and configuration changes. Keeping web servers, proxies and load balancers patched is part of Layer 7 defence. See the DDoS Protection vs WAF guide for how network and application controls divide.
Recognising a Layer 7 flood
The hardest call in the first ten minutes is whether a surge is an attack, a marketing campaign, a news mention or a misbehaving partner integration. The NCSC New Zealand notes that a small number of requests to resource-intensive services can take a system offline even when protection tools detect nothing unusual, so monitor the application, not only the edge. The signals below work best in combination.
| Signal | Where to read it | Flood indication | Legitimate surge indication |
|---|---|---|---|
| Request rate per route | CDN or load balancer logs, APM | Concentrated on one or two expensive routes (search, login, cart, export) | Spread across landing pages and assets in normal proportions |
| Cache hit ratio | CDN analytics | Falls sharply: randomised query strings or cache-busting parameters | Stays stable or rises as popular pages are cached |
| Conversion and session depth | Web analytics, application metrics | Requests per session high, conversions flat, no asset loads after HTML | Conversions and sign-ups rise with traffic |
| Client fingerprint spread | Edge logs (User-Agent, TLS fingerprint, header order) | Many IPs sharing one fingerprint, or impossible browser and OS combinations | Normal mix of browsers and devices |
| Source distribution | Edge logs, ASN enrichment | Unusual share from hosting ASNs, open proxies or regions you do not serve | Matches campaign or audience geography |
| Error profile | Origin and application logs | Rising 5xx and upstream timeouts while edge bandwidth is unremarkable | Errors stay low unless capacity is genuinely short |
| Authentication results | Identity provider and application logs | Spike in failed logins or password resets with low success ratio | Login success ratio unchanged |
A login-endpoint flood with a low success ratio may also be credential stuffing; treat it as both until proven otherwise. Attackers sometimes use a denial of service as cover for other activity, so the NCSC New Zealand advises monitoring for other threats during an attack.
Rate limiting and challenge strategies
RFC 6585 defines HTTP status 429 Too Many Requests: it "indicates that the user has sent too many requests in a given amount of time" and may carry a Retry-After header. Its security considerations add that servers "are not required to use the 429 status code" and that during an attack it may be better to drop connections, because answering every request with 429 still consumes resources. Use 429 for well-behaved clients and APIs; use edge drops or challenges for flood traffic.
Rate limit design
- Choose the key: authenticated session, account ID, API key or OAuth client ID first; then a fingerprint (TLS and header characteristics); then IP address; then network prefix or ASN as a coarse backstop. IP-only limits punish users behind carrier-grade NAT, corporate proxies and mobile networks.
- Weight by cost: a search or PDF export may cost a hundred times a cached page. Give expensive routes their own lower thresholds rather than one global number.
- Set thresholds from data: take the 99th percentile of legitimate per-key request rates over several weeks, add headroom, and run new rules in log-only mode first. The NCSC New Zealand warns that thresholds set too high may trigger late or not at all.
- Enforce at several layers: edge (CDN or WAF) for bulk volume, API gateway for per-client quotas, application for business limits (for example, resets per account per hour). The NCSC recommends adding application logic to limit requests at each bottleneck that could cause cascading failure.
- Tell API clients: return 429 with Retry-After for API consumers so integrations back off. The IETF RateLimit and RateLimit-Policy header fields are still an Internet-Draft (draft-ietf-httpapi-ratelimit-headers-12, November 2026), so treat them as optional and expect changes.
See the Rate Limiting and API Abuse Guide for quota design in steady state.
Challenges and their cost
| Action | Effect on bots | Effect on real users | Use when |
|---|---|---|---|
| Non-interactive (JavaScript or proof-of-work) challenge | Stops simple scripts, raises cost for headless browsers | Small delay, breaks clients without JavaScript and many API consumers | Browser routes under attack |
| Interactive challenge (CAPTCHA) | Stops most automation, solvable by paid farms | Friction and accessibility impact | Short periods on login or sign-up only |
| 429 with Retry-After | Ignored by attackers | Well-behaved clients back off | APIs and partner integrations |
| Block or drop at edge | Stops matching traffic cheaply | False positives lose real users | High-confidence signatures, abusive ASNs, regions you do not serve |
The NCSC New Zealand notes that CAPTCHA can affect legitimate users, especially those using accessibility tools, and should be agreed with business teams first. See CAPTCHA and bot challenges.
Caching and origin protection
Every request answered at the edge is one the origin never sees. The NCSC advises considering a content delivery network for web services and ensuring it "appropriately masks or 'cloaks' your site so that an attacker cannot discover the true origin."
- Cache aggressively and normalise keys: cache static assets and anonymous HTML; strip or ignore unknown query parameters in the cache key so random strings cannot force misses.
- Serve stale on error: configure the edge to serve cached content when the origin returns errors or times out.
- Lock the origin: allow inbound HTTPS only from the provider's published IP ranges, or use an authenticated private connection or tunnel, and require an origin secret header or mutual TLS so traffic from other customers of the same provider cannot reach you.
- Hunt for origin exposure: check historic DNS records, subdomains that point directly at the origin (mail, staging, FTP, legacy hostnames), TLS certificates issued for origin names, outbound email headers and webhook callbacks that reveal the server address. If the origin IP has ever been public, consider changing it after locking it down.
- Protect administrative paths: the NCSC advises keeping administrative access on a separate network or subnet so operators are not locked out by the attack they are fighting.
See the CDN Security Guide for edge configuration, including the trust you place in a provider that holds your TLS keys.
WAF and DDoS service roles
Clear ownership avoids the situation where everyone assumes the other control is handling the flood.
| Function | DDoS mitigation service | Web application firewall | Application and API gateway |
|---|---|---|---|
| Absorbs volumetric and protocol floods | Primary | Not designed for it | No |
| Inspects HTTP requests | At Layer 7 tiers of the service | Primary | Per route and client |
| Rate limits by IP or fingerprint | Yes, adaptive in many services | Yes, rule based | Yes, by API key or client |
| Rate limits by account or business action | Rarely | Limited (needs session context) | Primary |
| Blocks injection and exploit payloads | No | Primary | Partial (schema validation) |
| Emergency rule changes in an attack | Provider SOC, often under contract | Your team or managed service | Your team |
Check whether your contract includes Layer 7 mitigation, an always-on or on-demand mode, a response time commitment, and cost protection for traffic spikes during an attack. The NCSC advises confirming which attack types a scrubbing service covers before relying on it.
Bot management signals
HTTP floods increasingly come from residential proxy networks and headless browsers that execute JavaScript, which defeats simple challenges and IP reputation. Bot management adds signals that are harder to fake at scale:
- Client fingerprints: TLS ClientHello characteristics, HTTP/2 settings and header order compared with the claimed User-Agent.
- Behaviour: navigation paths, timing between requests, whether page assets load after HTML, mouse and touch telemetry where privacy rules allow.
- Reputation: ASN type (hosting, residential, mobile), known proxy and anonymiser ranges, previous abuse.
- Verified automation: known search engine crawlers and partner integrations verified by reverse DNS or signed requests, so they are not blocked with the flood.
Treat AI crawlers and agents as a separate class with their own policy; see the Bot vs AI Agent Traffic Management Guide and the Bot Management Guide.
Response during an attack
The NCSC says organisations are likely to do better against a denial of service if they have a response plan ready, tested periodically, with graceful degradation built in. Run the response as a numbered sequence:
- Confirm and declare: check the signal table, rule out a planned campaign or release, open an incident and assign a single lead. Engage your DDoS provider early; on-demand services take time to activate.
- Characterise: identify the targeted routes, the method mix, top fingerprints, ASNs and regions, and whether requests are cacheable.
- Protect the origin: confirm origin lockdown is in place and that traffic is not arriving directly. If it is, block direct paths before tuning edge rules.
- Apply the cheapest effective control first: cache or serve stale for the targeted path; then targeted rate limits on the hot route; then challenges for anomalous fingerprints; then blocks for high-confidence signatures, ASNs or regions you do not serve.
- Degrade gracefully: the NCSC suggests turning off resource-heavy features such as site search or personalised recommendations, limiting dynamic content to logged-in users, or restricting access by source. Use a prepared static status page.
- Watch for collateral damage: track conversion, login success and support contacts as false positive indicators, and keep verified bots and partner allowlists in place.
- Expect follow-on waves: the NCSC warns attacks often return after the first wave is repelled, with changed patterns. Keep staff rotation in mind.
- Stand down and review: remove emergency blocks in stages, keep logs and rule change history, record attack characteristics and time to mitigate, and convert emergency rules into tested permanent ones where they proved accurate.
Roll back any rule that causes real-user loss quickly: keep each emergency change as a separate named rule so it can be disabled alone. The DDoS Response Playbook covers roles, communication and provider escalation.
Where identity fits
Strong rate limits key on identity, which means API keys, OAuth clients and service accounts are both the best limit key and a target. A leaked partner API key lets an attacker generate expensive authenticated traffic that bypasses anonymous limits, and abusive registrations create throwaway accounts that reset per-account quotas. Issue per-client keys with their own quotas, monitor per-key cost, and be able to revoke or throttle a single key in minutes without affecting other partners. See API Keys vs Service Accounts.
Measurement and framework mapping
Track these metrics so you know defences work before an attack proves it:
- Time to detect and time to mitigate for Layer 7 events, from first anomaly to stable service.
- Origin offload ratio: share of requests answered at the edge, overall and for expensive routes.
- Origin exposure findings: count of hostnames or paths that reach the origin without passing the edge (target zero).
- False positive rate of rate limit and challenge rules, measured from support contacts and challenge solve rates.
- Expensive-route coverage: share of high-cost endpoints with a dedicated, tested rate limit.
| Framework | Reference | Relevance |
|---|---|---|
| MITRE ATT&CK | T1499.002 Service Exhaustion Flood, T1499.003 Application Exhaustion Flood | The attacker behaviour this guide defends against |
| MITRE D3FEND | D3-ITF Inbound Traffic Filtering | Edge filtering and origin lockdown |
| NIST SP 800-53 Rev. 5 | SC-5 Denial-of-service Protection, SC-5(2) Capacity, Bandwidth, and Redundancy, SC-7 Boundary Protection | Control requirements for protection, capacity and edge |
| NIST CSF 2.0 | PR.IR-04, DE.CM-01 | Capacity to maintain availability; monitoring networks and services |
| OWASP API Security Top 10 2023 | API4:2023 Unrestricted Resource Consumption | Missing per-client limits on APIs |
Common failure patterns
- Origin reachable directly: an old DNS record or a mail server on the same address lets attackers skip the CDN entirely, so edge rules never see the flood.
- One global rate limit: a single per-IP threshold is too high to protect the search endpoint and too low for users behind shared NAT, so it blocks customers and misses the attack.
- Cache keys include arbitrary parameters: random query strings turn a cached page into a database query on every request.
- Provider not engaged in advance: on-demand Layer 7 mitigation, contacts and escalation paths are set up during the incident rather than before it.
- Challenges on API routes: a JavaScript challenge applied site-wide breaks mobile apps and partner integrations, turning mitigation into an outage.
- Logging collapses under load: the NCSC advises provisioning log storage with alerts and being ready to reduce certain log messages during an attack; without that, disks fill and evidence is lost.
Practitioner checklist
- Baseline request rate, cache hit ratio, latency and error rate for each expensive route.
- Lock the origin to provider ranges or a private tunnel and verify with an external test that no hostname reaches it directly.
- Normalise cache keys and enable serve-stale on origin errors.
- Set cost-weighted rate limits per route, keyed on account or API key first, tested in log mode.
- Confirm your DDoS contract covers Layer 7, its activation mode, response time and spike cost protection.
- Prepare degraded modes and a static status page, with owners who can switch them on.
- Patch web servers, proxies and load balancers for protocol denial of service flaws such as HTTP/2 Rapid Reset.
- Run a Layer 7 exercise with your provider at least yearly and record time to mitigate.
Standards and references
- NCSC: Denial of Service (DoS) guidance
- NCSC: Upstream defences
- NCSC: Response plan
- NCSC New Zealand: Preparing for and mitigating denial of service incidents
- IETF: RFC 6585 Additional HTTP Status Codes
- MITRE ATT&CK: T1499.003 Application Exhaustion Flood
- OWASP: API4:2023 Unrestricted Resource Consumption
- CISA: HTTP/2 Rapid Reset Vulnerability, CVE-2023-44487
Related NHI Mgmt Group resources: DDoS Protection Guide · DDoS Response Playbook · DDoS Readiness Checklist · Bot Management vs WAF