Welcome! Log In Create A New Profile

Advanced

limit_req_zone and limit_req: rate too strict

Bruno Prémont
April 06, 2012 09:26AM
Hi,

I have started using limit_req_zone + limit_req but am seeing more delayed
log entries than I would expect.

I have the following:

limit_req_zone $binary_remote_addr zone=one:10m rate=3r/s;
...
server {
...
location ~ .*\.php$ {
limit_req zone=one burst=10;
...
}


In the logs I see that when 2 requests happen near simultaneously from the
same IP address (e.g. page redirect to second PHP page or single
PHP-generated image referenced by page) the second and third request get
delayed if they arrive too early during the same second.


I would wish to limit the user to 3 requests within a 1s window though
not setting any constraint as to spacing between those requests, how can I
accomplish it or what changes to limit_req module would be needed to
not have a minimum 0.33s spacing between requests for above configuration?

Thanks,
Bruno

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

limit_req_zone and limit_req: rate too strict

Bruno Prémont April 06, 2012 09:26AM

Re: limit_req_zone and limit_req: rate too strict

Valentin V. Bartenev April 06, 2012 12:08PM

Re: limit_req_zone and limit_req: rate too strict

Bruno Prémont April 06, 2012 03:40PM

Re: limit_req_zone and limit_req: rate too strict

Valentin V. Bartenev April 06, 2012 04:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 314
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