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