Subscribe Subscribe | Subscribe Comments RSS
Subscribe in Bloglines

Add to netvibes
Add to Google Reader or Homepage

Balance from inLab Software GmBH is a simple, generic TCP proxy, which allows simple round-robin load balancing and graceful failover between several destination servers.

Balance is available at http://balance.sourceforge.net/.

A possible destination consisting of a host address and a port is called a "channel". A channel is member of a "channel group". Channels are numbered in a group starting with 0. Groups are numbered starting with 0, which is the initial default group. Balance accepts connections on the given port and forwards them to the supplied channels. At least one channel (in the default group) must be specified. If there are two or more channels specified in a group balance performs a simple round-robin load balancing between the channels.

Balance allows the definition of further channel groups. The connection scheme works as follows:

balance tries first to establish a connection to a channel in the first group (0), performing the standard round-robin load balancing scheme. If no channel in this group is available, balance proceeds with the next higher channel group. Groups are simply separated with a "!" at the command line at startup and can be controlled interactively with the "group" command.

A "%" instead of a "!" as a group separator declares the previous group to be of type "hash". This means that instead of a round-robin algorithm, a hash distribution based on the client ip address is used to determine the destination channel. This allows connecting one client always to the same server (e.g. balancing http sessions to a single server). Hosts may be specified either by hostname or by IP address. Ports may be specified either by name (as listed in /etc/services) or numerically. If no port is specified in a destination, the destination port defaults to the source port that balance controls.

Balance allows the specification of the maximum number of connections per channel. This parameter can be optionally added after the port specification separated by a colon (":"). If a maximum number of connections is specified a channel will only be used for this maximum number of simultaneous connections.

A maxc value of 0 denotes an unlimited number of connections. This is the initial default value of a channel.

The maximum number of groups and channels balance can handle is specified at compile time and is initially 16 channels in 16 groups.

Failover to another destination (a "channel") occurs if the connection is refused on the current channel or if the connect timeout is reached trying to establish a connection. If all possible destinations (channels) currently fail, the client connection to balance is closed.

For more information, click here

A professional edition of balance, BalanceNG offers much more advanced features including Layer2 (ethernet) load balancing. It is now available under a new Free Basic License: A basic one node load balancer setup with one virtual server and two targets may now be evaluated as long as needed at no charge. 

For more information, click here

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Leave a comment

Name: (Required)

eMail: (Required)

Website:

Comment: