Welcome! Log In Create A New Profile

Advanced

Re: Issues with limit_req_zone.

Francis Daly
July 05, 2017 03:14AM
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.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Issues with limit_req_zone.

Vishnu Priya Matha May 07, 2017 04:31AM

Re: Issues with limit_req_zone.

Francis Daly May 09, 2017 06:44PM

Re: Issues with limit_req_zone.

Vishnu Priya Matha July 03, 2017 02:46AM

Re: Issues with limit_req_zone.

Francis Daly July 05, 2017 03:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 257
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready