Maxim<br><br><div class="gmail_quote">On Mon, Mar 16, 2009 at 6:56 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello!<br>
<div class="im"><br>
On Mon, Mar 16, 2009 at 04:52:14PM +0530, Asif Ali wrote:<br>
<br>
> Cliff - Apologies - This is a second email thread actually [the earlier one<br>
> was posted days back]<br>
><br>
><br>
> Here is the config:<br>
><br>
> limit_zone one $binary_remote_addr 10m;<br>
> limit_conn one 150;<br>
><br>
> The app receives several hundred hits per second from various different ip<br>
> addresses.<br>
> I want to block specific IP only from sending in more than 100 or 150<br>
> requests per second..<br>
<br>
</div>Your understanding of what limit_conn does is wrong. It's to<br>
limit number of simultaneous connections served, not requests per<br>
second. It may be somewhat related to request per second only if<br>
requests take predictable time to answer.</blockquote><div> <br> - Thanks for clarifying - actually our app does deliver response in under 0.5-1.0 seconds. But limit_conn is definitely not the same as what I expected - I guess I will have to use to the new version as soon as it is stable. <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
If you want to limit requests per second - take a look at<br>
limit_req module in nginx 0.7.*.<br>
<div class="im"><br>
> What I am getting is a reduction in total traffic and half that amount for<br>
> ALL requests.<br>
<br>
</div>Also, take a look at what $binary_remote_addr (and $remote_addr)<br>
actually contains for you. It may e.g. contain address of your<br>
load-balancer if you use one, and you should use realip module to<br>
fix this.<br>
<font color="#888888"></font></blockquote><div> <br> Yes - I understand this...<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font color="#888888"><br>
Maxim Dounin<br>
<br>
</font></blockquote></div><br>Thanks again !<br>