Using Non-Zeus Webservers With The Zeus Load Balancer



Please Note!
The Zeus Load Balancer will work fully with any standards-compliant web servers used as backend machines. However, some changes do need to be made to the configuration in order for the Balancer to work well. Also, some features of the admin server, notably its ability to remotely configure a webserver, will not work with non-Zeus servers, because they lack the required functionality. As a result, manual configuration of all your web servers is required. Please read these instructions carefully before trying to set up your cluster!

Adminserver Configuration
When setting up the cluster, use the Adminserver to add your frontend machines as normal. When adding the backend machines, specify a control port value of '0'. This signifies that the machine is not a Zeus webserver, and so will be treated accordingly by the Adminserver (e.g. it will not try to automatically configure the server).

Note that on the 'cluster status' page, while the Adminserver still shows non-Zeus webservers on the network layout, it is unable to check whether or not the webserver is alive and working correctly - you must check this for yourself. Also, the real-time graphs of traffic, normally obtained by clicking on a server in this display, are not available on non-Zeus backends.

Balancer Configuration
The Adminserver is used to configure the frontend Zeus Load Balancers, supplying them with details of which websites are running. Without this information, the Balancers will not know which ports to listen on for HTTP or SSL connections.

The way to solve this problem is to use the Zeus Adminserver to add a virtual server for each site that your webservers are running. Go to the configuration pages, click on 'New Server' and create a simple new server. The only details that should be specified are:

Once all the virtual servers have been created, click on their traffic lights in turn so that they are all running. As this is done, the Load Balancer(s) will be configured to accept incoming requests on the corresponding ports.

Ports
By default, the Zeus Load Balancer contacts backend webservers on different ports to the ones it listens on for HTTP requests. For example, if the Balancer is being used to run a website on port 80, it will attempt to contact backend webservers on port 10080, i.e. an offset of 10000. This behaviour allows the Balancer and a webserver to co-exist on the same machine. However, if you already have a cluster of webservers configured to listen to port 80, you will want to turn this feature off!

To change the port offset, you need to edit the file $ZEUSHOME/balancer/global.cfg, which is the configuration file for the Balancer. The file must be changed for each running Balancer. The line that should be added to the configuration file is:

tuning!port_offset 0

Logging
Webservers that are not cluster-aware, when placed behind a frontend, will see all webpage requests as coming from the frontend machine. Consequently, all the logging information produced by the webserver will not include the actual sources of the page requests. The Zeus Load Balancer passes this information onto backend webservers by adding a header ('X-Cluster-Client-Ip') into each HTTP request sent. It is possible to make most webservers extract this line and log it, if you configure them correctly.

For example, to make Apache produce a Common Log Format with the correct IP address of each client, add the following command to your Apache configuration file:

LogFormat "%{X-Cluster-Client-Ip}i%l %u %t \"%r\" %s %b"

SSL
SSL connections share the same logging problems as with ordinary HTTP requests. That is, backend webservers see all of the SSL connections as originating from the Balancer. Because the Balancer does not decode SSL traffic, it cannot add in a header providing the true client's IP address.

Instead, by default the Balancer prefixes each SSL connection with four bytes containing the client IP address. As a result, servers that do not expect these extra bytes will not function! To resolve this, it is possible to configure the Balancer not to send this extra data. Do this by adding the following line to the $ZEUSHOME/balancer/global.cfg file:

tuning!ssl_send_ip no

Mixing Zeus and non-Zeus webservers
If you are running a mixture of Zeus and non-Zeus backends, you must ensure that you disable some of the enhanced features of the Zeus webserver(s) in order for them to interoperate. Specifically, you must disable their balancer-aware options. To check this, examine the global configuration file $ZEUSHOME/web/global.cfg in each Zeus webserver installation. If you find the following line in the file, remove it:

balancer!enabled yes

After making the change, you must restart the webserver.