News for hackers. Stuff that matters.
Re:The Architecture of Open Source Applications: Nginx by nisa on Monday November 23, 2015 @05:23PM (#10617780)
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.

Re:The Architecture of Open Source Applications: Nginx by DantesRequiem on Monday November 23, 2015 @05:28PM (#10617806)
Historical 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.

Re:The Architecture of Open Source Applications: Nginx by ryuuchin on Monday November 23, 2015 @06:10PM (#10618025)
Also 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).
Re:The Architecture of Open Source Applications: Nginx by WildUtah on Monday November 23, 2015 @08:14PM (#10618536)
"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.

Re:The Architecture of Open Source Applications: Nginx by twothamendment on Monday November 23, 2015 @05:51PM (#10617931)
I'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.
Re:The Architecture of Open Source Applications: Nginx by rgbrenner on Tuesday November 24, 2015 @01:32AM (#10619442)
there 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.

Re:The Architecture of Open Source Applications: Nginx by librvf on Tuesday November 24, 2015 @03:04PM (#10623255)
Technically 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.
Re:The Architecture of Open Source Applications: Nginx by hueving on Monday November 23, 2015 @06:09PM (#10618021)
Apache supports SNI as well.
Re:The Architecture of Open Source Applications: Nginx by malka on Monday November 23, 2015 @07:28PM (#10618347)
.htaccess are a huge drag for performances. I think it might contribute to the slow label.
Re:The Architecture of Open Source Applications: Nginx by suneilp on Monday November 23, 2015 @08:25PM (#10618568)
Those 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.

Re:The Architecture of Open Source Applications: Nginx by creshal on Tuesday November 24, 2015 @04:14AM (#10619851)
> 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.

Re:The Architecture of Open Source Applications: Nginx by cortesoft on Monday November 23, 2015 @06:15PM (#10618045)
It got the slow label from all the years BEFORE 2012.....