Live data from Hacker News

Nginx reaches 33.3% web server market share while Apache falls below 50%

w3techs.com

181–190 of 190 posts

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#181
post #174

Earlier quoted context omitted.

I don't know what world you live in, but Apache only runs prefork if you configure it to run in prefork . Saying that is "how it works most of the time" is complete and total nonsense. I don't even know how to parse that... Also complete and total nonsense is the lack of health checks (which is, iirc, only available for paid nginx), TLS support and load balancing algos. I think nginx has some kind of hash LB method t…

There are numerous modules and setup stuck in prefork mode. And the alternative with workers is a joke compared to the event loop of HAProxy and nginx. HAProxy > nginx > apache Of course if you compare apache to nginx, you can find stuff where nginx is lacking too. Agreed, a lot of critical features are stripped in the open source nginx. TLS = tcp with tls, not https.

"There are numerous modules and setup stuck in prefork mode"

I have no idea what in the heck you are talking about. If one must use mod_php than it is recommended that you avoid a threaded MPM, but even that is no longer 100% true; you can run mod_php and Event is most implementations with no issues at all.

"stuck in prefork mode" is a nonsensical phrase. prefork is a MPM.

Just because something is threaded doesn't make it slow. Take varnish for example. There are tradeoffs on all implementations, that's why Apache httpd allows for prefork, worker(threaded) and event-based architectures which the sysadmin/devops can choose for their own particular case. But "Oog. Event be Good. Threads be Bad" is really completely missing the very real tradeoffs of both.

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#182
post #181

Earlier quoted context omitted.

There are numerous modules and setup stuck in prefork mode. And the alternative with workers is a joke compared to the event loop of HAProxy and nginx. HAProxy > nginx > apache Of course if you compare apache to nginx, you can find stuff where nginx is lacking too. Agreed, a lot of critical features are stripped in the open source nginx. TLS = tcp with tls, not https.

"There are numerous modules and setup stuck in prefork mode" I have no idea what in the heck you are talking about. If one must use mod_php than it is recommended that you avoid a threaded MPM, but even that is no longer 100% true; you can run mod_php and Event is most implementations with no issues at all. "stuck in prefork mode" is a nonsensical phrase. prefork is a MPM. Just because something is threaded doesn't m…

Apache default is prefork, which was appropriate to run php app the way they were done more than a decade ago. It is utterly inappropriate nowadays.

For load balancing, events trumps every other mode, that's just the way it is.

HTTP and TCP balancing are inherently mono thread operations. There is no need for threading at all, multiple threads are actually decreasing performances).

In HTTPS and TLS mode, the encryption is the bottle neck. So you use one process per core (that process needs events).

HaProxy lets me have one process pinned down to each core of the system while network card IRQ are on a dedicated core. Apache can't do half of that.

We could get into how nginx and HaProxy parser are insanely optimized. Whereas apache is not and it cannot be because of the modules.

Of course, not everyone has to push 10g or 30k requests/s with their load balancers.

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#183
post #71

nginx is creating a name and market for itself as a reverse proxy, even though there are better solutions for reverse-proxies out there, everything from HAProxy to Apache Traffic Server to even Apache httpd. But this is an important market to have. Why? Because it allows for the perception that the "web runs on nginx" simply because all you see are the nginx web proxies and nothing behind that. So what are the server…

You forgot to mention, that you're Jim Jagielski, the director of The Apache Software Foundation, who carefully monitors nginx news and never miss an opportunity to say something bad about it. Haters gonna hate.

When users have flagged comments for violating the guidelines, please don't post them again.

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#184
post #181

Earlier quoted context omitted.

"There are numerous modules and setup stuck in prefork mode" I have no idea what in the heck you are talking about. If one must use mod_php than it is recommended that you avoid a threaded MPM, but even that is no longer 100% true; you can run mod_php and Event is most implementations with no issues at all. "stuck in prefork mode" is a nonsensical phrase. prefork is a MPM. Just because something is threaded doesn't m…

Apache default is prefork, which was appropriate to run php app the way they were done more than a decade ago. It is utterly inappropriate nowadays. For load balancing, events trumps every other mode, that's just the way it is. HTTP and TCP balancing are inherently mono thread operations. There is no need for threading at all, multiple threads are actually decreasing performances). In HTTPS and TLS mode, the encrypti…

Apache default is NOT prefork, unless you are using something older than Apache 2.4. Of course it is utterly inappropriate nowadays, which is why NO ONE USES IT, but people love spreading the FUD that Apache is still prefork.

The rest of your "analysis" suffers from the same misinformation as this. I especially like "Whereas apache is not and it cannot be because of the modules.". I have no idea what in the world you mean by that. Why "because of the modules"?

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#185
post #184

Earlier quoted context omitted.

Apache default is prefork, which was appropriate to run php app the way they were done more than a decade ago. It is utterly inappropriate nowadays. For load balancing, events trumps every other mode, that's just the way it is. HTTP and TCP balancing are inherently mono thread operations. There is no need for threading at all, multiple threads are actually decreasing performances). In HTTPS and TLS mode, the encrypti…

Apache default is NOT prefork, unless you are using something older than Apache 2.4. Of course it is utterly inappropriate nowadays, which is why NO ONE USES IT, but people love spreading the FUD that Apache is still prefork. The rest of your "analysis" suffers from the same misinformation as this. I especially like "Whereas apache is not and it cannot be because of the modules." . I have no idea what in the world yo…

Having modules require apache to parse a lot of information from the request, and make them available and editable in variables.

This gives a lot of flexibility but it has a performance costs.

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#186
post #184

Earlier quoted context omitted.

Apache default is NOT prefork, unless you are using something older than Apache 2.4. Of course it is utterly inappropriate nowadays, which is why NO ONE USES IT, but people love spreading the FUD that Apache is still prefork. The rest of your "analysis" suffers from the same misinformation as this. I especially like "Whereas apache is not and it cannot be because of the modules." . I have no idea what in the world yo…

Having modules require apache to parse a lot of information from the request, and make them available and editable in variables. This gives a lot of flexibility but it has a performance costs.

And this differs from nginx how, exactly? Since it also "has modules"... So since nginx has modules it requires nginx to "parse a lot of information from the request, and make them available and editable in variables. This gives a lot of flexibility but it has a performance costs." ??

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#187

This is like (or worst) than comparing orange and apples. Nginx and Apache are completely different.

Yeah highly configurable, full-featured http(s) servers expandable with modules are TOTALLY different.

But can Apache, natively, also be used as a reverse proxy, load balancer and HTTP cache? If yes, I am sorry about my wrong comment.

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#188
post #162

Earlier quoted context omitted.

FPM is being dropped? This is news to me, where can I read about this?

As people upgrade many are choosing PHP 7 through mod_php The below are links to benchmarks and discussions around mod_php vs. fpm. These are from last year 2016. Fast forward to today; I am seeing people move to php 7 and move back to mod_php. I believe we are at the start of a movement. Articles/stories will follow but only after the fact. https://www.symfony.fi/entry/symfony-benchmarks-php-fpm-vs-p... https://www.…

The first link is about PHP-PM, which is not mod_php, and is a new and unproven stack. The second link is a completely bullshit "echo 'Hello World';" with 100 concurrent requests - that benchmark is offering the stereotypical, utterly meaningless, metric.

The fact is that Apache + mod_php will keep an instance of the PHP interpreter active in every single child httpd process. With nginx+fpm, your static assets are served directly from nginx without the overhead of an unnecessary PHP interpreter loaded into that process, while only your PHP requests are funneled to FPM. The performance overhead of having a PHP interpreter loaded into the process that is only serving a static asset is astronomical.

At the end of the day, benchmark your shippable product. Never try to benchmark a "Hello World" or a Wordpress installation if you're not shipping a Hello World or Wordpress codebase. Purely based off professional experience, I have never seen a real-world app perform better on Apache+mod_php than on nginx+fpm.

The only thing PHP 7 gave us was essentially the ability to ignore HHVM as a "required performance booster". 90% of companies were already able to ignore HHVM; with the improvements made to PHP 7, it's now 95-99%+ of products that don't need to evaluate HHVM as a mandatory alternative. And yes, nginx+fpm is still the defacto standard for PHP 7; the links you have provided do not say any different.

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#189

Earlier quoted context omitted.

Yeah highly configurable, full-featured http(s) servers expandable with modules are TOTALLY different.

But can Apache, natively, also be used as a reverse proxy, load balancer and HTTP cache? If yes, I am sorry about my wrong comment.

Yes it can.

Re: Nginx reaches 33.3% web server market share while Apache falls below 50%

#190

Earlier quoted context omitted.

PHP is definitely a huge chunk of the reason why nginx has taken over Apache. php-fpm with nginx is the defacto standard , and PHP is far more prevalent than a lot of people think. Apache's mod_php(X) vs. nginx+php-fpm isn't even a debate. If someone is currently using Apache+mod_php, they probably have a smaller product that will eventually have to switch to nginx+fpm in order to scale. While I imagine PHP is the si…

I'm probably about 2 years out of being bleeding edge, but php-fpm&nginx are far from defacto standard. At least when you look at how the web is being served at large, looking at cPanel/WHM. I don't believe cPanel/WHM even supports nginx yet as a standard option.

Not to be disrespectful - I know that cPanel and similar have their place - but no real business that expects to have a presence is using cPanel or any other "easy setup".
Post reply on HN