0

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

3
  • Also related to this question: serverfault.com/questions/936670/… Commented Aug 6, 2019 at 15:43
  • Have you tried burst=500 delay=400? Commented Aug 7, 2019 at 5:28
  • I have, but based on testing it appeared that no matter how many requests I sent i couldn't seem to 'fill' the queue to then generate the error, any ideas why this might be the case? (it effectively seems like the queue length is set infinitely high) Commented Aug 7, 2019 at 8:34

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.