AliceWonder wrote:
I use php 5.6.x (apache mod_php) and where I find APCu beneficial is caching of database queries and complex server-side DOM manipulation. When the web app doesn't have to repeat those things once it has done them, it is much more responsive.
With respect to nginx, it's fantastic for static content but benchmarks I've seen with dynamic php I haven't seen big enough of an improvement to switch from the devil I know (apache) to something new, a lot of the benefits it had over apache have been improved in apache and/or are not an issue with apache if using a cdn for static content.
For example, you site gets slashdoted - with apache, serving the page and all the css / js / images from same apache could take it down but if static resources are on a CDN so apache doesn't need to serve that content, apache itself often does fine.
In all honesty it depends kind of how you have it configured, a php-fpm configuration under either lighttpd or nginx will pretty much always smoke Apache in any configuration with exception of static content (Apache actually still rocks generic content fairly well last I saw). Any benchmarks not showing an improvement were more than likely due to bad configurations in all honesty, most likely configurations not designed to
scale at the emulated traffic levels they were attempting to benchmark.
I still work with a client that runs an old half-crappy CakePHP 1.3 site off a single (albeit beastly) dedicated server, rolling lighttpd+php-fpm(w/ xcache)+mariadb(all XtraDB)+memcached, and we've effectively taken large reddit surges without so much as a sweat for the most part, largely due to a combination of the php-fpm configuration and a lot of query caching in memcached. Without reddit surges that site rocks around 2-3k hits a minute on a low average with a framework response time around 40-60ms, and normally at most we use 4-5GB of memory at the higher-end of stuff with 10-20% CPU load (load average of 1), also doing 10+ TB a month in traffic outbound.
Never ever under-estimate a decent properly done configuration for any stack, even on a single server
