I want to create a Rate limiting AWS WAF rule for my frontend application, I don't know how much threshold should I need to give because when page loads there is around 50 internal calls happening. Say 5000 people opening my site at a same time, there will 5000*50, but I should not set 2,50,000. Then how should I set the rate limiting threshold for frontend applications?
I have tried putting 100 as threshold in my rate limiting. So if I refresh thrice within 5mins period, it should block the site, but I was able to make multiple calls to that site which is more than 50 in 5mins period, Then how these threshold is calculated for frontend applications?
The WAF should be applying the thresholds per IP address, so 5000 people is 5000 different IPs. When you refresh many times, your browser cache should also reduce the number of hits to your origin also. The limits AFAIK are per second, but it might be reporting every 5 mins.