Welcome! Log In Create A New Profile

Advanced

Possible to have a limit_req "nodelay burst" option?

Richard Stanway
April 15, 2013 06:20PM
Hello,
I'm using the limit_req directive to control the rate at which my backends
are hit with requests. Typically a backend will generate a page and the
client will not request anything for a short while, so a rate of 1 per
second works well. Sometimes however a backend will return a HTTP redirect,
and then the client must wait for a one second delay on the request to the
redirected page. I'd like to avoid this if possible to avoid the slow
feeling when users click on redirected links.

The nodelay option looked like it would work at first glance, but this
bypasses the delay completely for all requests up to the burst, so it's
still possible for the backend to be hit with many requests at once.
Ideally I would like to have a "nodelay burst" option to control how many
of the burst requests are processed without delay which I could set to 2 in
my situation, while still delaying any further requests beyond that.

Another idea I had was to have the backend send a special header similar to
how X-Accel-Redirect works, eg X-Limit-Req: 0 to avoid counting a single
request towards the rate limit for purposes of redirects and similar
situations.

Any other thoughts how something like this could work?
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Possible to have a limit_req "nodelay burst" option?

Richard Stanway April 15, 2013 06:20PM

Re: Possible to have a limit_req "nodelay burst" option?

Maxim Dounin April 15, 2013 06:40PM

Re: Possible to have a limit_req "nodelay burst" option?

Richard Stanway April 15, 2013 08:10PM

Re: Possible to have a limit_req "nodelay burst" option?

ppy July 04, 2013 12:03PM

Re: Possible to have a limit_req "nodelay burst" option?

Yumi June 16, 2014 08:31PM

Re: Possible to have a limit_req "nodelay burst" option?

justpusher February 05, 2016 04:51AM

Re: Possible to have a limit_req "nodelay burst" option?

Andreas S. October 15, 2014 03:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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