nlb load balance linux
Load balancing can help with almost any kind of service, including HTTP, DNS, FTP, POP/IMAP, RDP and SMTP.
There are a number of open source load balancing applications, but one simple command-line load balancer, balance, remains one of the most popular available.
Description: simple but powerful generic TCP proxy
Long Description: Balance is 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.
# wget http://www.inlab.de/balance-3.42.tar.gz
# tar -zxvf balance-3.24.tar.gz
# cd balance-3.24
# make install
To balance Terminal Services Connections(RDP) I do:
# balance -f -t 20 -d 3389 servercex04 servercex03 iservercex02 servercex01 %
balance [-b addr] [-B addr] [-t sec] [-T sec] [-adfpHM]
port [h1[:p1[:maxc1]] [!%] [ … hN[:pN[:maxcN]]]]
balance [-b addr] -i [-d] port
balance [-b addr] -c cmd [-d] port
-a enable channel autodisable option
-b host bind to specific address on listen
-B host bind to specific address for outgoing connections
-c cmd execute specified interactive command
-d debugging on
-f stay in foregound
-i interactive control
-H failover even if Hash Type is used
-M use MMAP instead of SHM for IPC
-t sec specify connect timeout in seconds (default=5)
-T sec timeout (seconds) for select (0 => never) (default=0)
! separates channelgroups (declaring previous to be Round Robin)
% as !, but declaring previous group to be a Hash Type
balance smtp mailhost1:smtp mailhost2:25 mailhost3
balance -i smtp
balance -b 2001:DB8::1 80 10.1.1.1 10.1.1.2
balance -b 2001:DB8::1 80
The connection is not forwared to the servers, the connection is ESTABLISHED
to the balance server who then forward it to the server. That means that if
the balance server crashes all clients go down. I have not tested with high
volume of traffic to see if the performance is reliable.
I found no logs… Only if I use the -f options wich leaves it in foreground.
On Ubuntu, and I also got that bug on Fedora 11