<div dir="ltr">I'll give that a try. I really appreciate your help Maxim!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 13, 2013 at 10:01 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<div class="im"><br>
On Wed, Nov 13, 2013 at 09:09:55AM -0600, Justin Deltener wrote:<br>
<br>
> Aha, that is the lightbulb moment.<br>
><br>
> So if we're talking actual rate..which makes sense how would you setup a<br>
> scenario with the following requirements.<br>
><br>
> You can have whatever rate you want as long as you don't exceed 5 proxy<br>
> requests in the same second. I don't care if 5 come within 5ms of each<br>
> other.. Hitting 6 total proxy requests in 1 second would kill the request.<br>
> It seems we can't really specify that without increasing the rate which in<br>
> turn could allow a sustained session with high rates to still have a ton of<br>
> requests come in to kill the server.<br>
<br>
</div>What you are asking about is close to something like this:<br>
<br>
limit_req_zone ... rate=5r/s;<br>
limit_req ... burst=5 nodelay;<br>
<br>
That is, up to 5 requests (note "burst=5") are allowed at any rate<br>
without any delays. If there are more requests and the rate<br>
remains above 5r/s, they are rejected.<br>
<div class="im"><br>
> We're attempting to account for 301 redirects which spawn requests much<br>
> faster than normal human requests. I realize we could add a get param to<br>
> the url to excuse it from the limit, but that seems a bit out there..<br>
><br>
> I also don't quite understand how long a burst rate can be sustained. It<br>
> seems one could set the default rate to 1/m and set the burst to whatever<br>
> you like..<br>
><br>
> Does that make sense?<br>
<br>
</div>The burst parameter configures maximum burst size, in requests (in<br>
terms of "leaky bucket" - it's the bucket size). In most cases,<br>
it's a reasonable aproach to set a relatively low rate, switch off<br>
delay, and configure a reasonable burst size to account for<br>
various things like redirects, opening multiple pages to read them<br>
later, and so on.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/en/donation.html" target="_blank">http://nginx.org/en/donation.html</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><p><a name="SafeHtmlFilter_SafeHtmlFilter_SafeHtmlFilter__MailAutoSig"><span style="font-size:10.5pt;font-family:Consolas">Justin Deltener</span></a></p>
<p><span style="font-family:Consolas;font-size:10.5pt">Nerd Curator | Alpha Omega Battle Squadron</span></p><p><span style="font-family:Consolas;font-size:10.5pt">Toll Free: 1-877-216-5446 x3921</span></p><p><span style="font-family:Consolas;font-size:10.5pt">Local: 701-253-5906 </span><span style="font-family:Consolas;font-size:14px">x3921</span></p>
<p><span style="font-family:Consolas;font-size:10.5pt"><img src="http://www.realtruck.com/images/realtruck_logo_200.jpg"></span></p>
<p><span style="font-size:10.5pt;font-family:Consolas"><a href="http://www.realtruck.com/" target="_blank">RealTruck.com</a></span></p>
<p><a href="http://www.realtruck.com/about-realtruck/#realtrucks-guiding-principles" target="_blank"><span style="font-size:9.0pt;font-family:Consolas">Guiding Principle #3</span></a><span style="font-size:9pt;font-family:Consolas">: Improve</span></p>
</div>
</div>