How To Set Up A Loadbalanced High-Availability Apache Cluster - Page 4

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by falko (Contact Author) (Forums) on Thu, 2006-04-27 11:04. ::

7 Further Testing

You can now access the web site that is hosted by the two Apache nodes by typing http://192.168.0.105 in your browser.

Now stop the Apache on either webserver1 or webserver2. You should then still see the web site on http://192.168.0.105 because the load balancer directs requests to the working Apache node. Of course, if you stop both Apaches, then your request will fail.

Now let's assume that loadb1 is our active load balancer, and loadb2 is the hot-standby. Now stop heartbeat on loadb1:

loadb1:

/etc/init.d/heartbeat stop

Wait a few seconds, and then try http://192.168.0.105 again in your browser. You should still see your web site because loadb2 has taken the active role now.

Now start heartbeat again on loadb1:

loadb1:

/etc/init.d/heartbeat start

loadb2 should still have the active role. Do the tests from chapter 5 again on loadb1 and loadb2, and you should see the inverse results as before.

If you have also passed these tests, then your loadbalanced Apache cluster is working as expected. Have fun!


8 Further Reading

This tutorial shows how to loadbalance two Apache nodes. It does not show how to keep the files in the Apache document root in sync or how to create a storage solution like an NFS server that both Apache nodes can use, nor does it provide a solution how to manage your MySQL database(s). You can find solutions for these issues here:


9 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous Coward (not registered) on Tue, 2008-11-25 12:33.

Nice article, although I think Load Balancing is a little misleading.

This is High Availability - an active / passive server relationship, there is no load sharing

Submitted by namwodahs (registered user) on Thu, 2006-10-19 22:06.
This is a great tutorial! Worked first time through. I've been very impressed with your selection of tutorials on this site. Thank You!
Submitted by Anonymous (not registered) on Mon, 2006-05-15 12:06.

How To very mutch!!!!

By Marcos Abadi

Brazilian

Submitted by Anonymous (not registered) on Sun, 2008-09-28 20:43.

Hi,

seems to be a great tutorial !

I'd like to know if this kind of load balancing setup can be SSL aware, means, an SSL session is able load balanced between nodes ?

Thanks a lot 

Submitted by Anonymous (not registered) on Tue, 2008-09-30 23:03.
can you tell me if this tutorial implements session-aware load-balancing as we need to use this for big site which is session driven.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
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