After spending roughly 36 hours trying to get the combination of heartbeat and ldirectord to cooperate, I threw in the towel and went in search of something simpler so I could test my code without becoming a full-time Linux Administrator.  Introducing Balance, an easy to use load-balancer that won’t make you crazy.  Before we get started, just a quick note to you Ubuntu users out there:  The balance package available from the repositories as of the time of this writing is out of date and has a bug that seems to cause non-IPv6 addresses to fail (bummer).

Now then, if you’re on Red Hat, you will want to use the EPEL repositories from Fedora (setup instructions here)

su root
yum install balance
# Bind port 80 on the localhost to port 80 on servers 1 and 2
# The -f option will keep the process in the foreground
balance -f 80

Was that simple or was that simple? For more specific options, the man page for the software is very informative and explains, with examples, how to perform most tasks.