News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Systems Architect Blog:
Apache2 vs Nginx for PHP application
March 29, 2013 @ 10:41:38

On the Systems Architect blog there's a recent post from Lukasz Kujawa about comparing Apache2 and Nginx for PHP applications, specifically when using the PHP-FPM module. His tests are based on the results from three different application types - a large Zend Framework 1 app, a small PHP script and a WordPress installation.

If you've ever been trying to squeeze more out of hardware you must have come across Nginx (engine x). Nginx usually appears in context of PHP-FPM (FastCGI Process Manager) and APC (Alternative PHP Cache). This setup is often pitched to be the ultimate combo for a web server but what that really means? How much faster a PHP application is going to be on a different web server? I had to check it and the answer as often is - that depends.

He ran the tests on an Amazone EC2 instance and optimized the server to ensure that there was a little interference as possible. The used the Zend Optimizer Plus opcode cache and PHP 5.4 and set the logs to go to memory instead of disk. Graphs included in the post show the results of the benchmarking of each application, with the differences (in most cases) not being that wide of a gap.

There isn't big difference between Apache2 and Nginx in PHP context. Yes, Nginx can be much faster when delivering static content but it won't speed up PHP execution. Running a PHP script seams to be so CPU challenging task that it completely eclipse any gain from a web server.
0 comments voice your opinion now!
apache2 nginx performance benchmark zendframework1 wordpress native


blog comments powered by Disqus

Similar Posts

PHPit.net: Using WordPress as a Content Management System (Part 2)

Marco Tabini's Blog: 5 PHP Performance Tips You Probably Don't Want To Hear

Christopher Jones' Blog: Oracle & PHP Users: don't miss the Zend Conference

Gonzalo Ayuso's Blog: Performance analysis fetching data with PDO and PHP.

Ed Finkler's Blog: Encouraging steps towards security in Wordpress 2.5


Community Events





Don't see your event here?
Let us know!


interview introduction configure library developer application laravel series code api wordpress language bugfix threedevsandamaybe community release list project framework podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework