Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

A long time ago the development of apache walks into a wrong direction. Apache get fat and slow.

For now nginx is first choice for Webperformance, but in some years the next thing will arrive.



Apache isn't dead, nor slow, nor going anywhere. As a pluggable module based server, new worker modules will ensure it keeps up just fine.


The difference is actually pretty massive.

See http://wiki.dreamhost.com/Web_Server_Performance_Comparison for instance.


That's a completely invalid and biased test. They forced Apache into it's worst scaling mpm module, the process based model, which by the way is not the default, and then conclude Apache doesn't scale as well after intentionally breaking it. Lies lies and damn lies.


Aka the mode you have to use if you don't want PHP to blow up.


It's not Apache's fault PHP sucks. Use a better language and Apache works fine with a modern worker module. The issue here is not Apache, it's PHP.


PHP's market share has only been going up (at least over the past three years) and currently sits at about 80% of all server-side programming languages, by at least one count. [0]

[0] http://w3techs.com/technologies/history_overview/programming...


But the point is Nginx lets you have your cake and eat it too....no issues with PHP and fast performance and less memory usage.


But Nginx is not running the PHP code, whatever the application daemon on the background does. Nginx simply proxies to it. Apache can get similar performance if you offload PHP and not use the mod_php.


That's great, but it's got nothing to do with Apache. If you choose a shitty language, and PHP is shitty no matter how popular it gets, you're limited in choices elsewhere. There's clearly a market for Nginx, low memory virtual servers running PHP. Remove PHP and use a better language and Apache scale just fine even in low memory conditions because without PHP, you don't have to use the old fashioned process model. Apache can work with PHP-FPM just like Nginx using the new evented worker mpm, but as PHP devs clearly find Apache confusing there's no reason to bother.


> without PHP, you don't have to use the old fashioned process model.

Immediately followed by:

> Apache can work with PHP-FPM just like Nginx using the new evented worker mpm

seems contradictory. Can you clarify this bit?


The Apache evented worker is very new, just out in 2.4, so it's still standard practice to use the process model. The new way should bring it inline with Nginx but it's too new to say if it's as stable as Nginx; at least for me to say it.


There are now three major MPMs:

Prefork - if you want to use mod_php, you're stuck with this. I think this is what you're referring to as "the process model"

Worker - Uses threads to handle connections. A big step up from prefork, but not as awesomesauce as nginx.

Evented - The new MPM which use epoll

It's been possible to run PHP(-fpm) under "worker" (via FastCGI) for years, and it performs adequately. I never benchmarked, but I was using this setup back when nginx was still too bleeding-edge for my tastes, and it certainly beat the pants of prefork/mod_php


Switch PHP to FastCGI under Apache (as it is under nginx), and this isn't a problem.


I did not say that apache is dead. I use it since over 10 years on many servers, but i use it today because of historical reasons.

I use nginx too and see the difference. There is a place for apache, but not the leadership of webservers.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: