How can I set up a master/slave configuration for my load balanced services?We have written a script that will configure the Zeus Load Balancer sothat it will switch between a 'master' and 'slave' group of back-endson demand. The switch is controlled by an external program, so thatcustomers can provide their own scripts (e.g. to monitor a database,check a file server, and so on) to determine whether the master or theslave servers will be used. To use this feature, you must first download the following file, and unpackit in the directory where you have installed your Zeus Load Balancer. If youare using two Load Balancers for fault tolerance, please ensure that youinstall the program on both Load Balancers. Monitoring tool for Zeus Load Balancer Installation instructions To set up this monitoring tool, you will need to unpack the file as shownbelow. You will need to be root to do this. The following commands assumethat the Zeus Load Balancer is installed in /usr/local/zeus andthat you have downloaded the monitor.tgz file into the /tmpdirectory. Change these locations as appropriate.
This will have copied the new scripts into your Load Balancerinstallation. You now must configure the script by editing the filebalancer/monitor.cfg. The file contains the following settings:
g the Load BalancerAfter editing the monitor.cfg file, you should check that theLoad Balancer is also configured correctly. In the Admin Server GUI, ensurethat the Load Balancer shows all of the back-ends - masters andservers. If any are missing, be sure to add them in. To configure a load-balanced service to make use of themaster/slave switching, set up the port configuration asnormal. Again, be sure to configure the service to use all ofthe back-ends. The service can also freely use any of the back-ends thataren't in the master or slave group of back-ends. Finally, now that everything is set up, you must run theservice-monitor program to start everything off. To do this,run the command (as root):
If you have installed the Zeus Load Balancer to start on boot, thenthe service-monitor program will also automatically start up on boot. TroubleshootingIf there are any problems, you should first take a look in the errorlogs for the Load Balancer(s). This is found in balancer/log/errorsinside the Zeus installation. If the service monitor finds any problems, thenit will report them here. While the service monitor is running, please note that the Admin ServerGUI will always show all of your back-end servers, masters and slaves,regardless of whether they are being used at that moment. You can click onindividual back-ends to see what traffic they are currently serving. Also,the 'diagnosis' tool for the balancer will also report that the Load Balancerhas a different list of back-end servers from the admin server. This iscorrect - the Load Balancer will have removed either the masters or theslaves from their configuration, so this is not a problem. |
Recently...
Other Resources
|





