Linux Version

Support

Cluster configuration

Note: This section assumes you have a configured load-balanced environment.  If you need advice on setting up a load-balanced environment using mod_proxy, you may want to check this URL for a good start: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html -in particular the section about BalancerMember.

WAX for Linux supports load-balanced configurations.  Each node in the cluster must be added to the server configuration on each server.  To configure your cluster, you must edit /etc/wax/waxd.conf by hand.

Below is an example of waxd.conf with a basic cluster configuration:

<wax:daemon  enabled="true" logTo="/var/log/wax/" socket="/var/run/waxd.sock">
    <cluster>
        <add hostname="node1.example.com" zone="NY" />
        <add hostname="node2.example.com" zone="NY" />
        <add hostname="node3.example.com" zone="MN" />
        <add hostname="node4.example.com" zone="WA" />
    </cluster>
</wax:daemon>

This configuration indicates that there are 4 nodes in the cluster.  Each node has a hostname and a zone.  The hostname identifies the server in the cluster, and the zone specifies which zone the server is in.  Zone can be string, in this example we've used states, representing where the physical servers reside.

In the event of a request, combined resources will be generated on that one server.  Once the browser comes back to pick up the resources for that HTML document, it may request the resources off another server.  For example, if node2.example.com is asked for a resource, it first asks node1.example.com, because it is in the same zone.  If node1.example.com returns a 404 for that resource, it will request the resource from other zones.

Note:  In order to determine which zone your host is in, you will need to make sure that the <cluster> configuration contains an <add> node for your server.  For example, in /etc/wax/waxd.conf on server node3.example.com

<wax:daemon enabled="true" logTo="/var/log/wax/" socket="/var/run/waxd.sock">
    <cluster>
        <add hostname="node1.example.com" zone="NY" />
        <add hostname="node2.example.com" zone="NY" />
        <add hostname="node4.example.com" zone="WA" />
    </cluster>
</wax:daemon>

This configuration will NOT work, because node3.example.com cannot determine which zone it is in.