1/11/12

Re: [development] Experience with mod_fcgid

Hey Peter,

Your 2 cents were spot on. I've now transitioned all my sites to nginx & php-fpm and I'm stunned at the results. Here are the advantages I'm getting:

1. Nginx and php-fpm are totally independent, they can each run as separate users and communicate via sockets or TCP.
2. php-fpm can be configured to run as a separate user for every virtual host. (bottom line? A user who gains php access to a site can't do any damage to other sites on the same server)
3. php-fpm can override php.ini configurations per virtual host! php-fpm itself can be configured per virtual host, so you can control how many php-fpm processes that would go to each virtualhost based on site statistics (have a heavy site? increase its php-fpm config without increasing it for any other site on the server)
4. Unlike apache with fastcgi, nginx with php-fpm shares processes per virtual host, so APC is usable!
5. Detaching nginx from PHP means that all static content is served without loading the PHP parser as apache with mod-php does with every request.
6. Nginx is event-driven, even with thousands of connections, nginx memory footprint is nigligible (something around 15 MB RAM!)
7. Some more benefits I can't remember :)

Configuration wise, I can't say it's been a walk in the park. With so many live sites, I had my hand on my heart most of the time and did have down-times during the process no matter how much I tried not to. Nginx is not your simple apt-get install and go, so it's a big leap forward.

But the end result is well worth it. All in all, my sites are blazing fast now. All I can say is WOW! Without going into formal benchmarks, I would say it's 5x speed increase! And my memory footprint has gone down from 2 GB to 1 GB. If I double the php-fpm processes for all my sites, footprint will probably go up, and speed will boost to around 7-8x speed increase! Where on earth was this web server before? Recommendation to all, get on the train :)

Best Regards,



---------- Forwarded message ----------
From: Peter Droogmans <Peter@attiks.com>
To: "development@drupal.org" <development@drupal.org>
Cc: "Ms. Nancy Wichmann" <nan_wich@bellsouth.net>
Date: Wed, 14 Dec 2011 16:51:55 +0100
Subject: Re: [development] Experience with mod_fcgid

Hi,

 

My 2 cents, give nginx a try, I started using it with http://drupal.org/project/barracuda and I'm now using it in combination with aegir for my remote servers and to be honest it was one of the best decision ever ;p

 

Cheers,

Peter



--
Ashraf Amayreh
CEO | O-Minds
Cell. 962 78 8099997
Tel. 962 6 5655150
Fax. 962 6 5675150
Skype: aamayreh

www.o-minds.com
web development | web design
user experience | branding design

Connect with us on Twitter
http://twitter.com/ominds

Connect with us on LinkedIn
http://www.linkedin.com/in/aamayreh

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.