I am looking for an open source loadbalancer for linux. My requirements are simple. I want One load balancer infront of multiple webservers. It should be able to split the load evenly among the webserver using a round robin fashion. Easy to install and simple to use. Moreover I want to add webservers dynamically(on the go) to the loadbalancer without the need to stop/restart the loadbalancer.

Thanks for your help.

-Sethu

link|improve this question

64% accept rate
2  
possible duplicate of Software http load balancer? – pauska Jun 9 '11 at 16:05
I tried various load balancers like Balance, Distributor, Apache's mod_proxy_balancer. I have a client program that creates nearly 100 threads that tries to ping the WS ( in this case through a loadbalancer). In all the load balancers I tried, after a minute i get connection time out error. In the apache error log I found : do_ypcall: clnt_call: RPC: unable to send;errno = Operation not permitted . I still dont understand what it means and how to solve it. – sethu Jun 9 '11 at 21:14
Thanks for your views, I used Apache's mod_proxy_balancer and it works, but at times i get 503 error and in the logs i find all servers are in error state. Any idea about this ? – sethu Aug 22 '11 at 18:28
feedback

closed as not constructive by Zypher Jan 23 at 19:52

This question is not a good fit to our Q&A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the FAQ for guidance on how to improve it.

4 Answers

up vote 1 down vote accepted

haproxy will do this as well.

I have setup Keepalived for various clients. It automates all the IPVS stuff.

link|improve this answer
1  
I usually pair the two together, on two (or more) machines. Haproxy for layer 7 load balancing, and keepalived for high availability. – JimB Jun 10 '11 at 1:49
can u brief me a little more please – sethu Aug 17 '11 at 18:08
@sethu - what do you want to know? – Wim Kerkhoff Aug 18 '11 at 3:00
I want to know how to dynamically add nodes to the haproxy for loadbalancing. – sethu Sep 1 '11 at 15:30
@sethu: As far as I know, you can only add new nodes by editting the haproxy config file, then send appropriate signal to haproxy to reload it. – Wim Kerkhoff Sep 3 '11 at 2:12
show 3 more comments
feedback

Have a look at LVS (ipvs) LinuxVirtualServer I'm using it for load-balancing a proxy cluster. It has both simple round-robin and more complicated balancing policies.

link|improve this answer
Will I be able to add nodes dynamically to it ? – sethu Jun 8 '11 at 15:29
@sethu, you need to tell the load balancer (LVS) the name and port you want to use on your webservers. You could pre-configure a bunch that don't yet exist. If then you added them by starting web services up there, the load balancer could pick them up and start sending work to them. – dmourati Jun 8 '11 at 16:08
@sethu, Of course, it is possible. Moreover, LVS is able to load balance any TCP or even UDP service. Dynamical balancing (according to worker hosts availability) can be made with "ldirectord" monitoring daemon. – HUB Jun 8 '11 at 18:21
I tried the installation of LVS. But It seems we have to compile it with the kernel. Is it possible to install it as a tool and use it. The installation looks a bit complicated. Or have I understood it the wrong way? – sethu Jun 8 '11 at 19:33
1  
LVS needs a kernel module, but doesn't you Linux distro has it compiled? – HUB Jun 9 '11 at 8:15
show 4 more comments
feedback

Nginx allows you to change the configuration on the fly. See the section "Loading a New Configuration Using Signals" here

link|improve this answer
cool didn't know Nginx could do that – dmourati Jun 8 '11 at 16:10
feedback

Would a simple DNS load balancing work for you?

link|improve this answer
1  
DNS roundrobin is a poor choice for load balancing, and definitely doesn't fit the OP's requirement for dynamically configuring services. – JimB Jun 9 '11 at 16:02
The only thing mentioned is load balance via Round Robin and to add webservers...not services and even less in a dynamic way. Sorry to say but I don't think my suggestion deserved a -1... – Alex Jun 9 '11 at 19:12
there's a difference between balancing a webserver(a service) and a physical webserver, and DNS can't make that distinction. He does day that he wanted to add servers dynamically (with a "load balancer", and "on the go"), which you can't do easily with DNS due to multiple layers of caching, and keeping reasonable TTL's for the records. Finally, DNS roundrobin is a poor load-balancing solution in and of itself. – JimB Jun 9 '11 at 21:05
DNS roundrobin can also break some applications on recent browsers (I've caught chrome and safari doing this), because they'll cache all IP address for a host, and rotate them internally, sending subsequent requests to each server. Webapps often rely on some state through a series of redirects, and this is broken when the dns changes during the chain of requests. – JimB Jun 9 '11 at 21:08
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.