<div>Hi Malte.<br>Being able to establish persistent&nbsp;connections&nbsp;would enable nginx to &#39;reuse&#39;&nbsp;them -- thus avoiding the (small) latency of TCP slow start for each connection.&nbsp; Of course the question that then arises in ones mind would be&nbsp;&#39;how many permanent connections to make&#39;--a possible answer being either a fixed number per backend, or a dynamic pool (
i.e. as many as you ever happen to need, reusing them as they are freed).&nbsp; It would be nice, for example, to be able to specify a certain number of maximum connections to each instance of Mongrel (running Ruby on Rails) at one, as only one can be processed at a time, and this would then guarantee load balancing between them.
</div>
<div>&nbsp;</div>
<div>The next step in this particular paradigm would be to have nginx specify and open a port on which backends can connect, themselves, and then have nginx automatically balance between all currently connected&nbsp;back ends.&nbsp; This would enable a user to create more mongrel instances (say on other machines) and attach them to nginx silently and without any down time.
</div>
<div>&nbsp;</div>
<div>In retrospect I think TCP slow start is not&nbsp;dramatically slow when on the same machine, and nginx already does some nice load balancing, but my suggestions might result in a minimal gain, but maybe a few milliseconds.&nbsp; Thoughts?
</div>
<div>Thanks.<br>-Roger<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 9/17/07, <b class="gmail_sendername">Malte Sussdorff</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:sussdorff@sussdorff.de" target="_blank">sussdorff@sussdorff.de
</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Hi Roger, which benefits do you envision from this, can you give<br>examples? I am just intrigued. Thanks Malte
<br><br>Am 17.09.2007 um 21:08 schrieb Roger Pack:<br><br>&gt; Hmm. I then wonder if nginx has the optional ability to establish <br>&gt; constant connections with a backend, then reuse those (i.e. its own<br>&gt; keep-alive&#39;s with an http proxy--establish a single connection,
<br>&gt; client A connects to nginx, nginx uses it, then after that B <br>&gt; connects to nginx, nginx reuses A&#39;s connection for B&#39;s transfer).<br>&gt; That might be useful. Thanks!<br>- <br>-Roger Pack<br>I like belief. 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.google.com/search?q=free+bible" target="_blank">http://www.google.com/search?q=free+bible</a> </blockquote></div>