1

I'm trying to begin load balancing on an ElasticHosts cloud server, and their system doesn't allow the user of VRRP.

Does anyone know of any non-VRRP load balancers that are pre-packaged for standard Debian/Ubuntu?

I've tried the non-VRRP UltraMonkey, but the software looks like it's getting old and it's no longer packaged nicely - the last release was for Debian Sarge.

Advice gratefully received.

1 Answer 1

2

UltraMonkey is essentially just an umbrella project for several components that are useful when building a load balancer on a Linux box. The components are:

  • ipvs. Present in the vast majority of distros' stock kernel (2.6 and later), compiled as a module. Run modinfo ip_vs to see if present in your kernel. Still in current development; and has had ipv6 support added quite recently. Code has to be up to kernel standards, and yields extremely good performance. See http://www.linuxvirtualserver.org/software/ipvs.html for more info.
  • ipvsadm. A command-line tool used to administer IPVS, allowing you to add and remove backend servers from a virtual group, set server weights, choose the scheduling algorithm (e.g. round robin, weighted least connection), and more. I can't speak for Debian but ipvsadm v1.2.5-1 is present in the standard Ubuntu repos, and there is a v1.26 available which was released in Feb 2011. So it's likely you can run a: sudo apt-get install ipvsadm and then a man ipvsadm on your system to give you the full details.
  • ldirectord. This is a health-checking daemon written in Perl, that also serves as a convenient interface to ipvsadm. It allows you to maintain a config file of your ipvs configuration, rather than having to script multiple ipvsadm commands yourself. Many different types of health-check can be performed on the backend servers. Again, ldirectord can be installed (in Ubuntu at least) via the standard repos, and is still under current development (IPv6 changes made in June 2011).
  • Linux-HA. To make things more complicated, this is also a combination project which actually includes ldirectord. Although as mentioned above, you can install ldirectord in its own right via the repos. As far as I can tell, the main addition that Linux-HA provides is Heartbeat, which allows you to cluster 2 (or more) load balancers which (as you might expect) send heartbeats to each other so that they are aware of each other's status, and failover when necessary. This is where the difference to VRRP comes in. You would tend to have your Virtual IPs active (i.e. "up") on one load balancer only so that only one machine is responding to ARP requests for the VIP. So the load balancers would be in Active/Passive state, and if the Slave node detects that the Master has failed, it will then "bring up" the virtual IPs. If Virtual IPs are up on both nodes, then you have a problem, commonly known as a "split-brain". More info on Heartbeat: http://www.linux-ha.org/wiki/Heartbeat.

I imagine that the lack of maintenance of the UltraMonkey project may be down to the fact that each individual component is now widely available (in binary format) in popular distros, which would have not have been the case 5+ years ago.

Note that using these componenets in the way described above may differ from your original plan, in that the load balancer is a dedicated machine; you don't install all this stuff on your application servers. Instead, the ipvs box would sit in front of your backend servers and "direct" traffic to them according to its scheduling algorithms and other config parameters (weights etc).

Unless you have a specific need to load balance at layer 4 (usually for performance reasons), you may also want to take a look at HAProxy, which is a layer 7 proxy with ample load balancing functionality. There are many well-answered HAProxy questions on ServerFault. Also, with regards to heartbeats/failover and managing your virtual IPs, you may want to look at keepalived as an alternative to Linux-HA's Heartbeat.

http://haproxy.1wt.eu/

http://www.keepalived.org/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .