On Tue, Apr 1, 2008 at 3:51 PM, Mark Smith &lt;<a href="mailto:smitty@gmail.com">smitty@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Round robin doesn&#39;t really solve anything in a web environment unless<br>
you can guarantee that all requests cost the same to process. &nbsp;I don&#39;t<br>
know that I&#39;ve ever seen a situation in which I thought it&#39;d be a good<br>
idea. &nbsp;(Not to say they don&#39;t exist! &nbsp;Just they seem rare.)</blockquote><div><br>Yeah, +1 to what Mark said.<br><br></div></div>Perlbal&#39;s load balancing is &quot;if you&#39;re free, you get a request&quot;.&nbsp; And then just keep a bunch of connections open to the backends.<br>
<br>When an incoming request comes in, and there&#39;s no free connection, a new connection to a backend is started.&nbsp; But IMPORTANTLY:&nbsp; that request is NOT TIED to that initiated connection.&nbsp; If another backend connection frees up in the meantime, that now-free connection gets the request that initially started the other connection.&nbsp; And then the second connection finally sets up, and finds nothing to do, it&#39;ll just chill for awhile and maybe get something later.<br>
<br>It&#39;s really pretty much perfect load balancing, as long as you don&#39;t set your MaxClients (in Apache speak) higher on your backends than they&#39;re actually capable of.&nbsp; If you&#39;re at 100% CPU non-stop on your backends, turn down their MaxClients.<br>