<div dir="ltr">It&#39;s definitly not the same thing. Nginx hasn&#39;t got yet the maxconn parameter.<br><br>From haproxy documentation :<br>&quot;It&#39;s a per-server &#39;maxconn&#39;, associated with a per-server and a per-proxy queue. This transforms haproxy into a request buffer between the thousands of clients and the few servers. On many circumstances, lowering the maxconn value will increase the server&#39;s performance and decrease the overall response times because the servers will be less congested.&quot;<br>
<br><br><div class="gmail_quote">On Thu, Oct 9, 2008 at 11:38 AM, Grzegorz Nosek <span dir="ltr">&lt;<a href="mailto:grzegorz.nosek@gmail.com">grzegorz.nosek@gmail.com</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;">
<div><div></div><div class="Wj3C7c">On Thu, Oct 09, 2008 at 11:28:54AM +0200, Micha³ Jaszczyk wrote:<br>
&gt; Hey,<br>
&gt;<br>
&gt; I&#39;m creating a pretty big HTTP RESTful API that is organized in the<br>
&gt; following way: There are many different functionalities in the API.<br>
&gt; Different functionalities are served by different backend machines and<br>
&gt; each functionality is another smaller RESTful API. In front of all<br>
&gt; that mess I&#39;d like to put Nginx. The idea is that Nginx would check<br>
&gt; the requested path and dispatch the request to proper backend, like<br>
&gt; this:<br>
&gt; - paths beginning with /some_path/... shoud be dispatched to<br>
&gt; <a href="http://backend-1.mydomain.com" target="_blank">backend-1.mydomain.com</a>,<br>
&gt; - paths beginning with /other_path/.. shoud be dispatched do<br>
&gt; <a href="http://backend-2.mydomain.com" target="_blank">backend-2.mydomain.com</a>,<br>
&gt; - etc.<br>
&gt;<br>
&gt; So far everything can be done in Nginx easily. But: backends are<br>
&gt; written in Ruby on Rails and we all know how good HAProxy&#39;s &quot;maxconn<br>
&gt; 1&quot; is for Rails. How can I achieve the same in Nginx?<br>
<br>
</div></div>If I&#39;m right about what maxconn=1 does, grab a fresh copy of upstream_fair<br>
and set it up like this:<br>
<br>
upstream foo {<br>
&nbsp;server <a href="http://10.0.0.1:80" target="_blank">10.0.0.1:80</a> weight=1;<br>
&nbsp;server <a href="http://10.0.0.2:80" target="_blank">10.0.0.2:80</a> weight=1;<br>
&nbsp;# etc.<br>
<br>
&nbsp;fair weight-mode=peak;<br>
}<br>
<br>
Weight=1 is the default but it&#39;s nice to make it explicit in this case.<br>
<br>
...but give it a try with simple &#39;fair&#39; (without parameters) too.<br>
<br>
Best regards,<br>
<font color="#888888">&nbsp;Grzegorz Nosek<br>
<br>
</font></blockquote></div><br></div>