nginx/apache/php vs nginx/php nginx/apache/php vs nginx/php apache apache

nginx/apache/php vs nginx/php


nginx will definitely work faster than Apache. I can't tell about fastcgi since I never used it with nginx but this solution seems to make more sense on several servers (one for static contents and one for fastcgi/PHP).

If you are really targeting performance -and even consider C/C++- then you should give a try to G-WAN, an all-in-one server which provides (very fast) C scripts.

Not only G-WAN has a ridiculously small memory footprint (120 KB) but it scales like nothing else. There's work ahead of you if you migrate from PHP, but you can start with the performance-critical tasks and migrate progressively.

We have made the jump and cannot consider to go back to Apache!


Here is a chart showing the respective performances of nginx, apache and g-wan:

g-wan.com/imgs/gwan-lighttpd-nginx-cherokee.png

apache does not seem to lead the pack (and that's a -Quad XEON @ 3GHz).


Here is an independent benchmark for g-wan vs nginx, varnish and others http://nbonvin.wordpress.com/2011/03/14/apache-vs-nginx-vs-varnish-vs-gwan/

g-wan handles much more requests per second with much less CPU time.