12 ms·
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
by progx 13y ago
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.
- gnaritas 13y agoApache isn't dead, nor slow, nor going anywhere. As a pluggable module based server, new worker modules will ensure it keeps up just fine.
- TylerE 13y agoThe difference is actually pretty massive. See http://wiki.dreamhost.com/Web_Server_Performance_Comparison http://wiki.dreamhost.com/Web_Server_Performance_Comparison for instance.
- gnaritas 13y agoThat'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.
- TylerE 13y agoAka the mode you have to use if you don't want PHP to blow up.
- gnaritas 13y agoIt'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.
- TylerE 13y agoBut the point is Nginx lets you have your cake and eat it too....no issues with PHP and fast performance and less memory usage.
- gnaritas 13y agoThat'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.
- timdev2 13y ago> 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?
- gnaritas 13y agoThe 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.
- timdev2 13y agoThere 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
- btgeekboy 13y agoSwitch PHP to FastCGI under Apache (as it is under nginx), and this isn't a problem.
- progx 13y agoI 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.