Azure Front Door WAF rate limit policy doesn't block request for full rate limit duration

Mikiel Agutu 0 Reputation points
2024-05-07T10:58:25.89+00:00

Hello

I have set up a rate limit WAF for Azure Front Door. I set it to 200 requests in a 5 minute window. After testing with a script to send 3000 requests in 60s I find that only some of my requests are blocked.

When configuring the WAF, the tooltip says 'Maximum number of requests allowed within the defined rate limit duration'. Therefore I would expect all requests to be blocked once the first one has hit the threshold, and for the block to last around 5 minutes. However this is not the case.

I am aware of this from the docs:

Requests from the same client may arrive at different Azure Front Door servers that haven't refreshed the rate limit counters yet. If the threshold is low enough, the first request to the new Azure Front Door server could pass the rate limit check. For a low threshold (for example, less than about 200 requests per minute), you might see some requests above the threshold get through. It's also worth noting that Azure Front Door WAF rate limiting operates on a fixed time period, so once a rate limit threshold is breached, all traffic matching that rate limiting rule is blocked for the remainder of the fixed window.

However I would still expect that, at some point, all the servers catch up and then I am blocked consistently for 5 minutes. But that doesn't seem to happen.

So what is the expected behavior? Is it possible for an IP to be be fully blocked or is it expected to always be a bit flaky?

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
622 questions
{count} votes