LTSP loadbalancer
From Mille-Xterm
Contents |
About
Project page on Launchpad : https://launchpad.net/products/ltsp-loadbalancer
Report bugs on Sourceforge : http://www.sf.net/projects/mille-xterm
REVU link : http://revu.tauware.de/details.py?upid=3466
Design
To dispatch users on available application servers, MILLE-XTERM provides a load balancer. To provide reliable load balancing, several factors, such as number of processors, speed and load average have to be taken into account.
The loadbalancer has 3 components. The load balancer agent runs on every application server, collecting data on the state of the application server and waiting for load-balancer server requests. The balancer is also a Python script that runs on the boot server. It contacts each load-balancer agent to determine its state and computes a weight for each server. A greater weight indicates that the server is less loaded and will be selected more often statistically to accept new users. A terminal request for an application server will then prompt the load-balancer server to get a randomly chosen application server in the weighted list.
Installation
The code is there : https://svn.revolutionlinux.com/MILLE/XTERM/trunk/mille-xterm-loadbalancer
Then, to install, as root :
python setup.py install
You may use RPM packages for Mandriva. (Debian/Ubuntu packages available soon)
Configuration
Let's examine a concrete example: three application servers and two boot servers. Install the mille-xterm-lbagent package on each application server, and install mille-xterm-lbserver on each boot server. Make sure that the respective services are started, lbagent and lbserver. Add one node entry for each application server in the file /etc/mille-xterm/lbsconfig.xml:
<?xml version="1.0"?>
<lbsconfig>
<nodes>
<group default="true" name="PROD">
<node address="http://10.0.0.1:8001" name="xapp1"/>
<node address="http://10.0.0.2:8001" name="xapp2"/>
<node address="http://10.0.0.3:8001" name="xapp3"/>
</group>
</nodes>
The agent configuration is done in the file /etc/mille-xterm/lbaconfig.xml. The default file is working well, but you may define custom variables to take account in the calculation.

