I'm trying to configure rate limiting using nginx's limit_req
feature to achieve a specific use case; I've been testing different options within my nginx configuration file, however, I can't seem to find the correct combination of options to achieve the following:
- Allow a burst of up to 400 requests in a minute (no delay)
- After the burst is used up, queue up to 100 requests
- process 6 request per second from the queue (delayed)
- if the queue size hits 100, return a HTTP 429 for new requests
I've tried several combinations of burst
, delay
and nodelay
along with setting the request rate in limit_req_zone
although I can't seem to achieve this, could you tell me where I'm going wrong?
Thanks