Welcome! Log In Create A New Profile

Advanced

Re: nginx load balancer help

Shri @ DevLib.Org
April 02, 2009 05:17AM
Here's what we have (simplified as there are some sections like mysql
slaves, squid proxies which have been leftout....)

1) 1 x Storage and DB server. Storage is on 10K RPM RAID 5. DB is on 15K RPM
Raid 10.

2) 2 x PHP-FPM servers which are connected to the DB (mysql) and Storage
(NFS). Lots of memory running xcache and pretty much everything can be
served out of memory.

3) 2 x FrontEnd Nginx servers which are connected to the PHP-FPM servers and
the Storage Server (NFS). In reality we're running squids (manage ACLs
etc...) + Nginx (URL rewriting etc) in front of these servers which are in a
private network).

4) 1 x Backup server which runs a dedicated mysql slave and does rsync
backups regularly.

DNS load balancing (and failover) takes care of where the request goes ....
one of the two front end Nginx.

Nginx loadbalancing takes care of where the PHP request goes. Static files
are sent out directly.

For further scaling consider loading mysql on the FPM servers and treating
them as slaves for read queries. This will add to the hardware requirements.

Once you've split out your delivery, application and database, you can then
scale the bottle neck areas (i.e. add more DB servers, or more php servers
or more front ends or caching in front of the front ends).

We've probably overcomplicated the setup, but since we're running fairly OLD
hardware.. I think its ok to be over cautious. Would love to see this all
scaled down into one nice blade server setup. :)


----- Original Message -----
From: "Floren Munteanu" <nginx@yqed.com>
To: <nginx@sysoev.ru>
Sent: Thursday, April 02, 2009 4:42 PM
Subject: nginx load balancer help


> Hi all,
>
> I need your help to setup nginx as load balancer.
> This is the hardware I plan to have: 3 web servers and 1 db server.
>
> Now I have 1 web server (nginx + php-fpm with php and static files to
> server) and 1 db server (mysql). The web server load is high, because to
> many online users. The db server is fine. So my goal is to add 2 extra
> web servers to lower the load. What setup do you recommend me to use? Do
> you have a tutorial for a load balancer setup with nginx?
>
> Thanks a lot for your help.
>
>
>
>
Subject Author Posted

nginx load balancer help

Floren Munteanu April 02, 2009 04:42AM

Re: nginx load balancer help

Floren Munteanu April 02, 2009 04:59AM

Re: nginx load balancer help

Shri @ DevLib.Org April 02, 2009 05:17AM

Re: nginx load balancer help

lbates35406 April 02, 2009 12:23PM

RE: nginx load balancer help

Floren Munteanu April 02, 2009 07:52PM

Re: nginx load balancer help

N3rdMaster November 04, 2010 08:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
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