Welcome! Log In Create A New Profile

Advanced

Re: Load balancing PHP via Nginx...

September 02, 2009 11:32PM
Maybe I'm not explaining myself correctly, maybe your suggestions are the
right way to go, but I see a lot of nginx examples such as this:
upstream phpproviders {
server 127.0.0.1:3000;
server 127.0.0.1:3001;
server 127.0.0.1:3002;
}

In this example, different port numbers are used, but you can use different
ip addresses.

inside the location / tag you would specify:

proxy_pass http://phpproviders

nginx in the simplest (default mode) would round robin the requests.

Is this not a good type of methodology?

Thanks

On Wed, Sep 2, 2009 at 10:28 PM, Jeffrey 'jf' Lim <jfs.world@gmail.com>wrote:

> 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@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!!!!!!!!
>>
>
>
Subject Author Posted

Load balancing PHP via Nginx...

iberkner September 02, 2009 10:33PM

Re: Load balancing PHP via Nginx...

Jeffrey 'jf' Lim September 02, 2009 11:00PM

Re: Load balancing PHP via Nginx...

iberkner September 02, 2009 11:32PM

Re: Load balancing PHP via Nginx...

Jeffrey 'jf' Lim September 02, 2009 11:40PM

Re: Load balancing PHP via Nginx...

iberkner September 03, 2009 12:02AM

Re: Load balancing PHP via Nginx...

Jeffrey 'jf' Lim September 03, 2009 12:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 240
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready