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