In the Nginx configuration, when you want to limit the request processing rate by using the limit_req_zone
/ limit_req instructions
, I don't really understand the use of the nodelay
option.
In my understanding, it terminates the requests above the defined rate without delaying them. So it seems equivalent to burst=0
.
That is why I don't understand the following example :
limit_req zone=one burst=5 nodelay;
burst
defines the number of requests which could be delayed, so what is the meaning to define burst
if there is the nodelay
option?
Best Answer
I find
limit_req
documentation clear enough.burst
is documented that way:nodelay
is documented that way:Requests are limited to fit the defined rate. If requests are incoming at a higher rate, no more than the defined number of requests per time unit will be served. You then need to decide on what to do with those other requests.
burst
, nonodelay
), requests are denied with an HTTP 503 error.burst
, you stack the defined number of requests in a waiting queue, but you do not process them quicker than the defined requests per time unit rate.burst
andnodelay
, the queue won't be waiting and request bursts will get processed immediately.