How To Set Up A Loadbalanced High-Availability Apache Cluster - Page 3
5 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.
6 Configure The Two Apache NodesFinally we must configure our Apache cluster nodes webserver1.example.com and webserver2.example.com 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: webserver1/webserver2: 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
20 hours 51 min ago
22 hours 19 min ago
1 day 1 hour ago
1 day 4 hours ago
1 day 7 hours ago
1 day 8 hours ago
1 day 8 hours ago
1 day 9 hours ago
1 day 10 hours ago
1 day 11 hours ago