Forum Moderators: phranque

Message Too Old, No Replies

Load balancing for a web site

How to setup multiple linux servers to support a single website

         

czamora

7:10 pm on Jun 12, 2006 (gmt 0)

10+ Year Member



Hi,
I have a growing website that needs to move from its current single-server setup to using a cluster of servers to deliver its dynamic pages.

My current host does not support load balancing among its servers, so I'm left to configure that on my own. Round-rovin DNS doesn't work for me as I'll need certain http requests to always go to the central server (the one with the master database).

My distro is Redhat 9, and I only access the server remotely through SSH. I'm using Apache 2 (and PHP and Mysql).

Any ideas on the simplest way to do this?
I've read a bit about LVS (http://www.linuxvirtualserver.org/) but it seems to require a kernel recompile, which is way beyond the things I would dare to try...

Thanks a lot.

morsee

9:54 pm on Jun 16, 2006 (gmt 0)

10+ Year Member



Just write a program that you can run on a cron frpm each server to check the other's for signs of life and take over them if they fail or have a high load.

Then write another program to act as a liason between apache and the failover script, which reads the loads and creates proxy distribution rules for apache in real time.

Quick solution, low overhead, and works really well.