limit_req_zone and limit_req: rate too strict

Valentin V. Bartenev ne at
Fri Apr 6 20:56:05 UTC 2012

On Friday 06 April 2012 23:38:59 Bruno Prémont wrote:
> >
> >
> > 
> >     limit_req zone=one burst=10 nodelay;
> In that case legitimate (from my point of view) requests get rejected
> which is even worse!

No, with "nodelay" parameter they won't be rejected or delayed until the 
overflow of burst.

> I wish those that fall under rate to not be delayed to get nice
> distribution (in my case 1s sample-rate!), but to have those between rate
> and burst being delayed to the following seconds.

There's no discrete "sample-rate". The limit_req module implements classical 
"leaky bucket" algorithm, which is simple, cheap and very common in the telecom 

 wbr, Valentin V. Bartenev

More information about the nginx mailing list