is it better to upstream php processes via nginx or use a front facing load balancer?

David Murphy david at icewatermedia.com
Thu Sep 10 16:59:32 MSD 2009


We use  nginx as  a pure LB. 

All php sessions and static files are shared to all apache 2 webheads via  OCFS2.

Then we  use upstream fair, and removed the need for sticky sessions ( by using a clustered FS to share the session files to all nodes)

This lets every image/html/php request go to different webheads for maximum response  for the EU.  

Also we wrote it so if nginx gets a  proxy error, it marks the webhead as bad and reprocess the request until it finds a good webhead to proxy to.

Btw use use apache webheads so we can use  php as a module rather than fcgi and spawn php type methods.

Hope it helps
David

-----Original Message-----
From: owner-nginx at sysoev.ru [mailto:owner-nginx at sysoev.ru] On Behalf Of Dinh Pham
Sent: Thursday, September 10, 2009 4:36 AM
To: nginx at sysoev.ru
Subject: Re: is it better to upstream php processes via nginx or use a front facing load balancer?

How high traffic have your sites got?

In my system, Nginx plays a role of a LB and static file server. It dispatches .php requests to a pool of Apache instances and PHP FCGI. It works great for 600 000+ page views per day.

Ilan Berkner wrote:
> Hi,
> Is it better to use a hardware load balancer in front of multiple 
> nginx boxes, each running their own php processes or is it better to 
> use nginx's upstream functionality and round robin php requests?

--
Posted via http://www.ruby-forum.com/.






More information about the nginx mailing list