Issues with limit_req_zone.

Francis Daly francis at
Wed Jul 5 07:11:53 UTC 2017

On Mon, Jul 03, 2017 at 02:46:39AM -0400, Vishnu Priya Matha wrote:

Hi there,

> Then how does the burst_size play a role here ? How is the burst_size be
> calculated ? 

"burst" means, roughly, "let this many happen quickly before fully
enforcing the one-per-period rule".

> Since requests_per_sec  is 100/s => 1 request per 0.01 sec - then does that
> mean 50 is also 50 per 0.01 sec or is it 1 per 0.02 sec ?

100/s means, roughly, "handle 1, then no more until 0.01s has passed".

With that config, "burst=50" means (again, roughly), "handle (up to)
50, then no more until (up to) 0.5s has passed".

You maintain the overall rate, but allow it be short-term exceeded
followed by a quiet period.

Test it by setting rate=1/s and burst=5.

Send in 10 requests very quickly.

See when they are handled.

Wait a while.

Send in 10 requests, the next one as soon as the previous one gets
a response.

See when they are handled.

Francis Daly        francis at

More information about the nginx mailing list