What volumetric filtering actually inspects
/search?q=x7k2p is a person searching or a bot. That decision happens several layers later.
The path a layer 7 request takes
- It opens a real TCP connection: SYN, SYN-ACK, ACK. The handshake completes, so SYN-flood protection has nothing to flag.
- It completes a TLS handshake if the site uses HTTPS. That costs your server or CDN some CPU for the key exchange, and the session is valid.
- It sends a well-formed HTTP request with a Host header, a believable User-Agent string, and a normal path.
- The web server (Nginx, Apache, or LiteSpeed) parses the request and checks its rules. If the page isn't served from cache, the request goes to the application backend.
- A PHP worker picks up the request, runs WordPress or whatever the app is, opens database connections, runs queries, and builds the page.
pm.max_children. Apache caps them with MaxRequestWorkers. LiteSpeed has its own process and connection limits for lsphp. When every worker is busy, new requests wait in a queue. When the queue fills or a timeout expires, visitors get a 502, 503, or 504 depending on the stack.
This is why bandwidth looks fine while the site is down. A small GET request can make the server spend real effort: an uncached page, a search query that scans a large table, a WooCommerce cart action, or a call to wp-login.php that triggers password hashing. The attacker sends little data and the server does most of the work. A few thousand requests per minute against an expensive endpoint can saturate a worker pool that handles normal traffic easily. (That figure is an illustrative example. The real threshold depends on how long each request takes and how many workers you have.)
A related variant, Slowloris, starves connections by holding them open instead of making each request expensive. It is covered separately in Thinking DDoS Only Floods Bandwidth? Application-Layer Slowloris Starves Connections Instead.
Why you can't just block it all
Separating attack traffic from real traffic in the logs
BASH
# Requests per minute, to see when the spike began and how sharp it is
awk '{print substr($4,2,17)}' /var/log/nginx/access.log | sort | uniq -c | tail -30
# Most requested paths (including query strings)
awk '{print $7}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -20
# Top client IPs and top User-Agent strings
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -20
awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -20/?s=abc123. Random query strings defeat full-page caching, because each URL is new to the cache and goes through to PHP.
Also check how many connections the web server is holding, to see whether workers are stuck or the queue is growing:
BASH
# Summary of socket states
ss -s
# Established connections on port 443
ss -tn state established '( sport = :443 )' | wc -lSignals a script usually gets wrong
| Signal | Real browser, typically | Common in L7 attack traffic |
|---|---|---|
| Request mix | HTML page followed by CSS, JS, images, fonts | HTML or one endpoint only, no assets |
| Accept-Language, Accept-Encoding | Present and consistent with the browser | Missing, or identical across thousands of IPs |
| Cookies | Set on first visit and sent back after | Never sent back, so every request looks like a new session |
| Referer | Usually present for navigation inside the site | Empty, or one value repeated everywhere |
| HTTP version | HTTP/2 or HTTP/3 when the server supports it | HTTP/1.1 from a client claiming to be a current Chrome or Firefox |
| Timing | Irregular, with pauses between page views | Regular intervals, or bursts in sync across many IPs |
/?s= every two seconds is a clear case.
The default combined log format doesn't record most of these headers. During an incident it helps to add them temporarily. In Nginx, define a separate log_format that includes http_accept_language, http_cookie, and $server_protocol, and write it to its own file so normal logs stay parseable. Turn it off afterwards. The cookie header can contain session tokens, and that file should be treated as sensitive.
In support, the confusing part for customers is usually the dashboard. It shows attacks blocked, so they assume the remaining traffic is clean. A useful first check is to compare the protection service's view with the origin access log. If the edge reports nothing unusual while the origin log shows a concentrated spike on one path, the attack is passing through at L7.
Turning findings into filters
pm.max_children past available memory causes swapping and makes the outage worse.
The practical takeaway: DDoS protection usually reports what it blocked at the packet level, and an L7 flood is designed to pass that check. When workers are saturated but bandwidth is normal, go straight to the origin access log. Look for paths that are hit far more than usual, query strings that bypass the cache, and clients that send a browser User-Agent without behaving like a browser. Filter on those traits, not on whole regions, so legitimate visitors keep getting through.