limit_req truncating responses

Igor Sysoev is at rambler-co.ru
Tue Sep 29 11:56:19 MSD 2009


On Tue, Sep 29, 2009 at 11:37:43AM +0400, Maxim Dounin wrote:

> Hello!
> 
> On Tue, Sep 29, 2009 at 12:11:02AM -0400, brianf wrote:
> 
> > Just a follow up to some more observed behavior:
> > 
> > It seems that if I set the burst number low enough to trigger 503's with my tests, the system continuously returns 503 until i restart nginx. Is this another known bug?
> 
> Current implementation counts requests against rate limit even if 
> it returns 503.  So if you have
> 
>     limit_req_zone  ...  rate=1r/s;
>     limit_req  burst=10;
> 
> and did 100 requests at a time (90 of which returned 503) - you 
> have to wait 100 seconds until next request will be allowed.
> 
> And yes, it's known issue.

I'm going to fix this in 0.8.18: to implement right leaky bucket algorithm.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list