You set a per-IP rate limit, say ten requests per second per address, and the site still went down during the next flood. The rate limiter's log shows almost nothing rejected. In most cases the limiter worked exactly as configured. A large botnet sends only a few requests from each of thousands of addresses, so no single IP ever gets close to the threshold.
To see why, it helps to look at what a rate limiter actually stores and what it compares against.
What a per-IP limiter actually keeps track of
Take nginx's limit_req module as a concrete case, since many hosting stacks use it or something built the same way. A typical setup looks like this:
limit_req_zone $binary_remote_addr zone=perip:10m rate=10r/s;
server {
location / {
limit_req zone=perip burst=20 nodelay;
}
}
The client first completes the TCP handshake and the TLS handshake, then sends its request. nginx parses the request line and headers. Before the request is passed to an upstream or to PHP-FPM, nginx runs the limiter. The limiter builds a key from $binary_remote_addr, which is the client address as raw bytes: 4 bytes for IPv4 and 16 bytes for IPv6. It then looks that key up in a shared memory zone that all nginx worker processes can see.
Each entry in that zone stores very little: when this key was last seen, and an excess counter. The algorithm is a leaky bucket. Every request adds one to the bucket, and the bucket drains at the configured rate, here 10 per second. If the excess goes past the burst value, nginx rejects the request, by default with a 503. Otherwise the request moves on to the content handler and becomes real work for the backend.
The important detail is that all of this state is kept per key. The limiter answers one question: is this particular address sending too fast? It has no idea how many requests arrived in total across all keys, and nothing in the design asks it to. A flood that is spread thin passes this check by design.
Why the numbers never trip the limit
Here is an illustrative example with round numbers. A botnet of 5,000 compromised residential devices or rotating proxy nodes (the scale mentioned in this rate limiting guide) has each device send one request every five seconds. Each IP sends 0.2 requests per second. The bucket for each address drains faster than it fills, so its excess stays near zero, and the limiter rejects nothing. The aggregate is 1,000 requests per second reaching your application.
The obvious response is to lower the per-IP limit. That usually hurts real visitors first. Many users share one public address: mobile carriers put large numbers of customers behind carrier-grade NAT, and an office of fifty people often reaches you from a single IP. If static assets pass through the same limited location, one normal page view can generate dozens of requests in under a second. To catch a bot that sends 0.2 requests per second, the threshold would have to sit below what a single human browsing normally produces.
IPv6 makes per-address limits weaker still. A single host often controls a whole /64 prefix. If the key is the full 128-bit address, an attacker can rotate addresses within that prefix and receive a fresh, empty bucket every time.
The Hostney knowledge base article on rate limiting describes the root problem well. Basic rate limiting is anchored to one dimension, requests per minute per IP. The attack as a whole floods the target, while each individual IP looks like a normal, low-activity visitor.
What runs out while the limiter stays quiet
Layer 7 floods rarely target cheap URLs. A static image is served from memory or the page cache at almost no cost, so attackers tend to aim at endpoints that do real work: login, search, cart, xmlrpc.php, or any URL with a random query string appended so the page cache treats each request as new.
Each of those requests goes through FastCGI to PHP-FPM. The PHP-FPM pool has a fixed number of workers. Once every worker is busy, new requests wait in the socket's listen backlog. When that wait exceeds nginx's timeouts, visitors start getting 502 and 504 errors. The database often reaches its connection limit around the same time. CPU and bandwidth graphs can look unremarkable during all of this, because the bottleneck is the worker count, not raw throughput.
This differs from slow-connection attacks, which hold sockets open without completing requests. That case is covered in the Slowloris article. A thin HTTP flood sends complete, valid requests, and each one is individually unremarkable.
Counting requests also misses a related trick that the credshields guide calls parameter splitting. Some APIs accept several queries or login attempts in one request body. If the limiter counts requests but ignores what each request contains, an attacker can pack many attempts into each one and stay under the limit even from a single address.
From the support desk, this case usually arrives as a complaint that the site is down while the firewall and rate limiter show nothing blocked. The first useful check is the shape of the traffic in the logs. Changing thresholds can wait until you know what you are dealing with.
Checking the spread in your access logs
Three read-only commands give you most of the picture. They assume nginx's combined log format at the default path. Adjust the path and field numbers for your setup, because Apache and cPanel per-domain logs are laid out differently.
# Requests per IP to one endpoint, busiest first
awk '7 ~ /^\/wp-login\.php/ {print1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -20
# Number of distinct IPs that hit that endpoint
awk '7 ~ /^\/wp-login\.php/ {print1}' /var/log/nginx/access.log | sort -u | wc -l
# Total requests to that endpoint per minute (logs are chronological, so no sort needed)
awk '7 ~ /^\/wp-login\.php/ {print substr(4, 2, 17)}' /var/log/nginx/access.log | uniq -c | tail -20
A thin distributed flood produces a recognizable pattern. Even the busiest IP has a small count, the distinct-IP count is very large, and the per-minute total jumps well above your normal baseline. A single abusive client looks the opposite way: one IP at the top with a huge count. Per-IP limits already handle that second case.
If the site sits behind a CDN or another reverse proxy, the first field in your log may be the proxy's address. In that case every request appears to come from a handful of IPs. Configure real-IP handling for your stack so that both the logs and the limiter see the actual client address.
Signals that see the whole flood
The fix is to count along dimensions where the flood is concentrated rather than spread out. Three kinds of signal tend to work.
The first is a per-endpoint rate: one shared limit on the expensive URL itself. In nginx, you can use a map that gives every login request the same key and gives every other request an empty key, which the limiter does not count:
map urilogin_bucket {
default '';
/wp-login.php $server_name;
}
limit_req_zone $login_bucket zone=login_total:1m rate=20r/s;
You then add limit_req zone=login_total burst=40; to the location that handles the login page. The numbers here are illustrative. Base yours on the per-minute baseline from the log check. Be aware of the trade-off: once this limit trips, real users on that endpoint get rejected too. What you get in return is that the PHP-FPM pool and the database stay available, so the rest of the site keeps working. Many setups put a challenge on that endpoint when the limit trips instead of returning a hard 503. Whether that is possible depends on your WAF or CDN.
The second signal is session behavior, which the API rate limiting overview describes as behavioral and contextual limits. A real browser loads the HTML, then fetches CSS, JavaScript, and images. It sends back cookies it was given earlier, includes a Referer, and pauses between pages. Flood clients often go straight to one dynamic URL, ignore Set-Cookie, never request assets, and attach random query strings. A simple cookie check catches basic scripts: set a cookie on the first response and require it before serving expensive endpoints. Headless browsers will pass that check, but running a full browser for every request costs the attacker far more CPU and memory.
The third signal is the client fingerprint. During the TLS handshake, the client's ClientHello message lists its cipher suites, extensions, and their order. That list depends on the TLS library the client uses, not on the User-Agent header it chooses to send. JA3, and the newer JA4, turn those fields into a short fingerprint string. If a request claims to be Chrome but its TLS fingerprint matches a scripting library, the claim is inconsistent. More importantly, a botnet running one tool across thousands of IPs often shares a single fingerprint, and that fingerprint becomes a key you can rate-limit on. HTTP/2 settings and header order can serve the same purpose. Stock nginx does not compute these fingerprints, so check what your CDN, WAF, or modules actually expose before you plan around them.
Keep the per-IP limit, because it cheaply stops single noisy clients. But it should not be your only layer. Add at least one limit keyed on the thing you are protecting, such as the login or search endpoint. When the site slows down and nothing is being blocked, check the distinct-IP count and the per-minute totals before you touch the per-IP threshold. For the related problem of floods that look like normal browser traffic even to DDoS protection, see what passes as legitimate at Layer 7.