PHP Load balancing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Can someone point me to a resource or something were I can set this up
cleanly. I don't want to re-invest the wheel. I just want the most
common way to do this. I know there is a database option and a non-
database option. I prefer the none-database option.

I will have 2 web servers with PHP installed.

Re: PHP Load balancing

At Mon, 11 Jun 2007 09:36:40 -0700, Anthony Smith let h(is|er) monkeys

Quoted text here. Click to load it

Do you specifically want to balance PHP scripts being executed between
machines or are you after load balancing the entire web service? The
latter is easier I'd think. Apache provides the tools, you may want to
look up "round robin DNS" in Google. (Dunno about IIS's features in this

I am not sure how I would fork off parts of a PHP script sensibly to
another machine in an easy way. Never thought of doing it really.


Schraalhans Keukenmeester -
[Remove the lowercase part of Spamtrap to send me a message]

  "strcmp('apples','oranges') < 0"

Re: PHP Load balancing

On Jun 11, 2:18 pm, Schraalhans Keukenmeester
Quoted text here. Click to load it

I would like to load balance the entire application. It justs seems as
if this should be common among PHP by now...

Re: PHP Load balancing

Quoted text here. Click to load it

Load balancing is not PHP-specific, except maybe for session data when
multiple requests for one user are directed to multiple servers. In
the simplest case, you put your script on two servers and that's it.
Some things which might be worth looking into:
Round robin DNS
MySQL replication
mod_rewrite load balancing
Linux Virtual Server
SSL offloading
Zend Platform
Barracuda load balancer

As you can see, I am assuming that you are using Linux, Apache, MySQL,
have enough access and knowledge to the server, use SSL, etc. etc. If
you do not ask specific questions, you can not expect specific answers.

Site Timeline