5 ms·
I really enjoy nginx, as it's more flexible to configure but I've never understood why Apache got this slow label... FTA: In February 2012, the Apache 2.4.x b
by nisa 11y ago
I really enjoy nginx, as it's more flexible to configure but I've never understood why Apache got this slow label...
FTA:
In February 2012, the Apache 2.4.x branch was released to the public. Although this latest release of Apache has added new multi-processing core modules and new proxy modules aimed at enhancing scalability and performance, it's too soon to tell if its performance, concurrency and resource utilization are now on par with, or better than, pure event-driven web servers. It would be very nice to see Apache application servers scale better with the new version, though, as it could potentially alleviate bottlenecks on the backend side which still often remain unsolved in typical nginx-plus-Apache web configurations.
I'm using Apache 2.4 with mpm_event + mod_proxy_fcgid and it's doing fine - 99% of the work and time spend is done in the FastCGI application anyway and for static content mpm_event is good enough. I wouldn't run a dedicated static CDN box on Apache but for everything that can run on a single server Apache can also do the job... even HTTP/2 with mod_h2 works fine as of 2.4.17
A problem with nginx is to figure out what matches in a complex config... it's not straightforward. .htaccess is nice and simple for a shared server with lot's of users.
I really like nginx but I guess most people just don't really need it. Migrating to 2.4 and mpm_event should be good enough.
- DantesRequiem 11y agoHistorical reasons...after nginx started blowing Apache's performance out of the water, Apache addressed some fundamental architectural issues and caught (mostly) up. As an example, I would refer you to a discussion down this thread about Apache 1.x forking for concurrent connections.
- ryuuchin 11y agoAlso just for context remember that on linux forking and threads are basically the same thing so you can't just switch out one for the other and expect performance to change (it won't).
- WildUtah 11y ago"forking and threads are basically the same thing" It's nowhere near that simple. You can fork lightweight like threads or heavy. One of the terrible things about Apache performance was all the heavy forking on every single request for generated pages. That was back when it was really expensive.
- twothamendment 11y agoI've used Apache forever and have always been able to tune it to get the job done. The thing that made me switch to nginx was the ability to use more than one SSL cert on the same IP. Now that I was "forced" to try it, I'm pretty happy with it.
- hueving 11y agoApache supports SNI as well.
- rgbrenner 11y agothere was never a time when nginx supported sni and apache did not. Nginx requires an openssl version that supports sni -- that was added in 0.9.8f on Oct 2007 (if you compiled openssl manually to enable it), and was enabled by default in 0.9.8j on Jan 2009. Apache supported SNI using mod_gnutls since 2005; and in 2.2.12 (July 2009) using openssl.
- librvf 11y agoTechnically correct, however for users that install from OS packages it's possible that they're getting a version of nginx that had SNI enabled and a version of Apache that did not.
- cortesoft 11y agoIt got the slow label from all the years BEFORE 2012.....
- malka 11y ago.htaccess are a huge drag for performances. I think it might contribute to the slow label.
- suneilp 11y agoThose can be disabled and I always do so. Location specific configuration can be put in the main configuration files. They should never be used unless you're in a shared hosting environment where you don't have a choice.
- creshal 11y ago> Migrating to 2.4 and mpm_event should be good enough. Debian e.g. only received 2.4 with Jessie. Meanwhile, a feature-comparable nginx was available at least in Wheezy, maybe earlier. If I have to choose between "compile my own Apache" and "just install nginx", well… Actually, I had to choose, and I picked nginx.