How To Set Up A Loadbalanced High-Availability Apache Cluster Based On Ubuntu 8.04 LTS - Page 4
12 Test The Load BalancersLet's check if both load balancers work as expected: loadb1/loadb2: ip addr sh eth0 The active load balancer should list the virtual IP address (192.168.0.105):
The hot-standby should show this:
loadb1/loadb2: ldirectord ldirectord.cf status Output on the active load balancer:
Output on the hot-standby:
loadb1/loadb2: ipvsadm -L -n Output on the active load balancer:
Output on the hot-standby:
loadb1/loadb2: /etc/ha.d/resource.d/LVSSyncDaemonSwap master status Output on the active load balancer:
Output on the hot-standby:
If your tests went fine, you can now go on and configure the two Apache nodes.
13 Configure The Two Apache NodesFinally we must configure our Apache cluster nodes webserver1.tm.local and webserver2.tm.local to accept requests on the virtual IP address 192.168.0.105. webserver1/webserver2: apt-get install iproute Add the following to /etc/sysctl.conf: webserver1/webserver2: vi /etc/sysctl.conf
Then run this: webserver1/webserver2: sysctl -p Add this section for the virtual IP address to /etc/network/interfaces: webserver1/webserver2: vi /etc/network/interfaces
Then run this: Please Note after the following step you will probably get this error: SIOCSIFFLAGS: Cannot assign requested address That is a normal bug and you can ignore it. webserver1/webserver2: ifup lo:0 If you change the IP at a later stage its recommended to do ifup lo:0 then ifdown lo:0 then again ifup lo:0 Finally we must create the file ldirector.html. This file is requested by the two load balancer nodes repeatedly so that they can see if the two Apache nodes are still running. I assume that the document root of the main apache web site on webserver1 and webserver2 is /var/www, therefore we create the file /var/www/ldirector.html: webserver1/webserver2: vi /var/www/ldirector.html
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com





print: 
Recent comments
1 day 13 min ago
1 day 1 hour ago
1 day 5 hours ago
1 day 8 hours ago
1 day 11 hours ago
1 day 11 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 14 hours ago