Maxim<br><br><div class="gmail_quote">On Mon, Mar 16, 2009 at 6:56 PM, Maxim Dounin <span dir="ltr">&lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;</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>
&gt; Cliff - Apologies - This is a second email thread actually [the earlier one<br>
&gt; was posted days back]<br>
&gt;<br>
&gt;<br>
&gt; Here is the config:<br>
&gt;<br>
&gt; limit_zone   one  $binary_remote_addr  10m;<br>
&gt;  limit_conn one 150;<br>
&gt;<br>
&gt; The app receives several hundred hits per second from various different ip<br>
&gt; addresses.<br>
&gt; I want to block specific IP only from sending in more than 100 or 150<br>
&gt; requests per second..<br>
<br>
</div>Your understanding of what limit_conn does is wrong.  It&#39;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>
&gt; What I am getting is a reduction in total traffic and half that amount for<br>
&gt; 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>