Hacker News new | ask | show | jobs
by andmarios 4731 days ago
Of course modphp would be faster as php becomes part of Apache with this approach. The problem is that not every Apache process is going to serve php. Most of them will be serving static files but will have the overhead of the embedded php library. The real overhead though comes due to that you can't control how many Apache processes serve php and how many static files. Processing php eats a lot of RAM and you can quickly bring you server down to its knees. You could opt for less Apache processes but then you would end up serving much less visitors.

Anyway, Apache these days is mostly set-up with fastcgi or php-fpm due to these issues and this has the added good that you can use the worker or event mpm, though most benchmarks are still with the older prefork mpm.

1 comments

So if all your static files are on a CDN and your web server is only hosting dynamic content, Apache is still the better choice for PHP applications?