Load balancing PHP via Nginx...

Jeffrey 'jf' Lim jfs.world at gmail.com
Thu Sep 3 06:28:42 MSD 2009


I would recommend using haproxy if you have the budget for a separate box as
a load balancer. As for doing it via the 2nd method... why would you want to
do that? And the underlying assumption here - can nginx do that? How would
it determine when the load has been reached for "this" box? (so that the
rest become "additional" fastcgi requests)

-jf


On Thu, Sep 3, 2009 at 10:11 AM, Ilan Berkner <iberkner at gmail.com> wrote:

> So the time has come for us to add another web server (number 2) to our
> configuration to help with the amount of connections we're getting.  I'm
> looking for some basic recommendations in terms of configuration of nginx.
> That is:
>
> 1. Do I run exactly the same configuration on both boxes and load balance
> externally (i.e. nginx + php-fpm on each box + dedicated mysql server) or
> 2. Do I run nginx + php-fpm on box A and route additional fastCGI requests
> to box B?
>
> What would the configuration look like?  How do I preserver sessions?  We
> are currently using memcached for session menagement and could place that on
> the dedicated data server.  What's the "recommended" methodology?
>
> Thanks!!!!!!!!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090903/1fb253d7/attachment.html>


More information about the nginx mailing list