Welcome! Log In Create A New Profile

Advanced

Re: Possible limitation of ngx_http_limit_req_module

May 12, 2015 12:33PM
Valentin V. Bartenev Wrote:
-------------------------------------------------------
> On Tuesday 12 May 2015 09:25:05 jwroblewski wrote:
> > My use case is that upstreams are supposed to return within ~100ms,
> > therefore using burst is not an option. I wanted to use limit_req to
> filter
> > out traffic which is exceeds my backend's processing capacity, but
> > apparently it is not the right tool to use, if it only operates with
> > millisecond-precision...
>
> What's problem with using burst? Could you explain why it's not an
> option
> for your case?

My nginx receives X r/s (lets assume X equals ~50000), and is supposed to respond within 100ms to every single of them.
Requests are dispatched to upstreams, which can only handle a total of Y r/s in a timely manner (Y being less than X, say 20000).
Knowing the capacity of my upstreams, I want nginx to *immediately* drop all excessive requests. This means, only first Y requests which came in during given second are to be pushed to upstreams, the remaining ones, starting from Y+1, are to be *immediately* 503'ed.

The reason why I can not use burst, it that burst introduces queuing, which means by the time the request leaves nginx, it is already late by some milliseconds, while I want the whole solution to be as real time as possible.

Having read the docs, I got the impressions that with "burst=0 nodelay" will let me achieve the goal outlined above. Burst enables "recovery" of excessive requests, while I want these dropped. Still, I might have gotten the docs wrong...

>
> > Could you please document this limitation?
> >
>
> Patches are welcome.
>
> But you're the only person I can remember who cares about it. For
> most of
> the users it will be just superfluous details.

I will be happy to submit a doc patch. It is possible that some users are simply not aware of this limitation, and loose requests because of it.

>
> wbr, Valentin V. Bartenev
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Possible limitation of ngx_http_limit_req_module

jwroblewski May 11, 2015 10:59AM

Re: Possible limitation of ngx_http_limit_req_module

Valentin V. Bartenev May 12, 2015 07:34AM

Re: Possible limitation of ngx_http_limit_req_module

jwroblewski May 12, 2015 09:25AM

Re: Possible limitation of ngx_http_limit_req_module

Valentin V. Bartenev May 12, 2015 09:44AM

Re: Possible limitation of ngx_http_limit_req_module

B.R. May 12, 2015 10:48AM

Re: Possible limitation of ngx_http_limit_req_module

Valentin V. Bartenev May 12, 2015 12:30PM

Re: Possible limitation of ngx_http_limit_req_module

jwroblewski May 12, 2015 12:33PM

Re: Possible limitation of ngx_http_limit_req_module

Valentin V. Bartenev May 12, 2015 01:02PM

Re: Possible limitation of ngx_http_limit_req_module

Maxim Dounin May 12, 2015 01:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 104
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready