Balance is our well known open source load balancing solution being a simple but powerful generic tcp proxy with round robin load balancing and failover mechanisms. Its behaviour can be controlled at runtime using a simple command line syntax.
Balance supports IPv6 on the listening side which makes it a very useful tool for IPv6 migration of IPv4 only services and servers.
Balance successfully runs at least on Linux(386), Linux(Itanium), FreeBSD, BSD/OS, Solaris, Cygwin, Mac-OS X, HP-UX and many more.
Balance is Open Source Software and released under GPL licensing terms.
BalanceNG is our full fledged, professional Software Load Balancer which comes with a 30 day trial license. Check it out if you need more capabilities including other protocols, session management and VRRP-HA.
Balance is part of almost any modern distribution and package repository, here just two examples:
# balance smtp host1.test.net host2.test.net
Connections to the local SMTP port will be forwarded alterating to the SMTP port on host1 and host2. Balance runs automatically in background.
# balance -b 2001:DB8::1 80 10.1.1.1 10.1.1.2
Balance binds on port 80 of the local IPv6 IP address 2001:DB8::1 and distributes connections to the IPv4 addresses 10.1.1.1 and 10.1.1.2.
# balance -b ::ffff:10.1.1.3 80 10.1.1.1 10.1.1.2
Balance binds on port 80 of the local IPv4 IP address 10.1.1.3 (provided in IPv6 notation) and distributes connections to the IPv4 addresses 10.1.1.1 and 10.1.1.2.
# balance -fp imap mailserver
Connections to the local IMAP port will always be forwarded to the host “mailserver”. Balance stays in foreground and all data is printed in readable format on stdout.
$ balance -f 8888 host1 10.1.1.1:8000
Connections to the local port 8888 are forwarded alternating to host1, port 8888 and the host 10.1.1.1, port 8000. Balance stays in foreground connected to the “controlling tty”.