News for hackers. Stuff that matters.
Re:Nginx reaches 33.3% web server market share while Apache ... by jimjag on Monday April 10, 2017 @01:41PM (#14080791)
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 servers behind nginx? 9 times out of 10 it is Apache httpd, and numerous instances of it at that. So for each single nginx server "seen" in these surveys, there are unknown multiples of Apache httpd behind the scenes doing the real work.

But all that messes up the popular, if incorrect, narrative that Apache httpd is dying and nginx is gobbling up instances. It's all about marketing baby, for a product that really isn't truly "open source" but more so open core. And people buy it hook, line, and sinker.

Re:Nginx reaches 33.3% web server market share while Apache ... by snug on Monday April 10, 2017 @02:34PM (#14081262)
> 9 times out of 10 it is Apache httpd, and numerous instances of it at that.

A lot of your post is not wrong, but that statistic is just not right at all. Less that half of the time we see apache instances behind NGINX, and it's mostly because it's legacy, and hard to move away from it. The other half of the time it's application specific web servers, or other NGINX instances.

Source: Worked for Cloudflare and now work at NGINX

Re:Nginx reaches 33.3% web server market share while Apache ... by jimjag on Monday April 10, 2017 @04:42PM (#14082346)
Of course, as someone who works for NGINX I would guess you would see more nginx behind nginx. Based on discussions with people who do Apache httpd support as well as what I've personally seen, 90% isn't that far off the mark. People like using httpd for dynamic content. A lot.
Re:Nginx reaches 33.3% web server market share while Apache ... by vfaronov on Monday April 10, 2017 @01:49PM (#14080877)
> So what are the servers behind nginx? 9 times out of 10 it is Apache httpd, and numerous instances of it at that.

Can you cite a source for this?

In my practice, the servers behind nginx are usually platform-specific application servers, such as Gunicorn or uWSGI for Python.

Re:Nginx reaches 33.3% web server market share while Apache ... by snowwrestler on Monday April 10, 2017 @02:19PM (#14081147)
I think the idea is that if you count every single website on the web, a huge number of them are crappy little sites on shared hosting. Shared hosting usually relies on .htaccess rules, which are only valid under Apache.

Popular PHP CMS software also relies on .htaccess. Wordpress for example allegedly powers about a quarter of all websites, and auto-creates an .htaccess file when you enable pretty links, which basically everyone does. Drupal ships with multiple .htaccess files.

Sure it's possible to adapt this code into Nginx configuration, but there is really no reason to do that. It's far easier to set up Nginx in front of Apache and get most of the Nginx benefits that way.

Re:Nginx reaches 33.3% web server market share while Apache ... by user5994461 on Monday April 10, 2017 @02:38PM (#14081299)
Or tomcat / jboss / websphere for Java applications.

There really are a lot of platforms.

Equally, there is a truckload of LAMP sites out there (Linux Apache MySQL Php) to give Apache the edge on pure quantity. It's been the standard for personal site hosting and forums for two decades. That's a long lasting effect. That's not where there is value and work for developers though.

Re:Nginx reaches 33.3% web server market share while Apache ... by iamacynic on Monday April 10, 2017 @01:54PM (#14080932)
yeah, or just ... more nginx.
Re:Nginx reaches 33.3% web server market share while Apache ... by ag_47 on Monday April 10, 2017 @01:54PM (#14080928)
> even though there are better solutions for reverse-proxies out there... Apache Traffic Server to even Apache httpd

Really? Completely disagree. Just look at the configuration files for these vs nginx.

Re:Nginx reaches 33.3% web server market share while Apache ... by jimjag on Monday April 10, 2017 @02:31PM (#14081243)
So your total criteria for what constitutes a "better reverse proxy" isn't performance, isn't lowest latency, isn't full HTTP compliance, isn't dynamic reconfiguration, or pluggable load balancing mechanisms but rather configuration files??

Sorry if I don't hold your opinion to that high a standard in that case.

Re:Nginx reaches 33.3% web server market share while Apache ... by user5994461 on Monday April 10, 2017 @02:43PM (#14081352)
Configuration files are important. You understand that once you have to untangle thousands upon thousands of lines of apache configuration. Luckily for me, that can pay a decent rate :D

In the context of load balancing, on the performance + latency + load balancing mechanism + configuration files criteria, Apache is the worst by a huge margin compared to both HAProxy and nginx.

Re:Nginx reaches 33.3% web server market share while Apache ... by jimjag on Monday April 10, 2017 @04:45PM (#14082382)
"performance + latency + load balancing mechanism"

Maybe 5-7 years ago then yeah... maybe. Not even close today. Apache has lowest latency and faster total transaction time based on various benchmarks. It all depends on how you are using it.

"configuration files criteria"

Got me there. But then again, 2.4 adds a LOT of ways to even streamline that, like mod_macro, mod_define, etc...

Re:Nginx reaches 33.3% web server market share while Apache ... by user5994461 on Tuesday April 11, 2017 @07:29AM (#14086678)
Performance + latency => I dunno what world you live in. Apache is still stuck in the prefork era (not that it's mandatory but it is how it works most of the time). It's not even playing in the same order of magnitude.

Load balancing => Apache doesn't even support healthchecks. I won't even get into the lack of TCP/TLS support or the lack of some load balancing algorithms.

Re:Nginx reaches 33.3% web server market share while Apache ... by jimjag on Tuesday April 11, 2017 @08:10AM (#14086903)
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 that httpd doesn't, although httpd has round-robin, byrequests, bytraffic, and bybusyness.

Wow.

Re:Nginx reaches 33.3% web server market share while Apache ... by user5994461 on Tuesday April 11, 2017 @08:28AM (#14087035)
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.

Re:Nginx reaches 33.3% web server market share while Apache ... by jimjag on Tuesday April 11, 2017 @01:11PM (#14090125)
"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 ... by user5994461 on Tuesday April 11, 2017 @02:39PM (#14091077)
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 ... by jimjag on Wednesday April 12, 2017 @07:52AM (#14096745)
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 ... by user5994461 on Wednesday April 12, 2017 @09:25AM (#14097399)
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 ... by jimjag on Wednesday April 12, 2017 @12:01PM (#14098966)
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 ... by ag_47 on Monday April 10, 2017 @02:41PM (#14081333)
You're right, we should build a CloudFlare competitor based on ATS and take over the market.
Re:Nginx reaches 33.3% web server market share while Apache ... by diminoten on Monday April 10, 2017 @03:04PM (#14081528)
To summarize your point (and correct me if I'm mistaken), Apache httpd is legacy that people don't seem to want to make the effort to move off of, but still want the benefits of nginx, so they'll stand up nginx in front of httpd, rather than migrate off of Apache (and update their platforms to support that).

I feel the "marketing" concept is less actual marketing and more feature appeal, but I guess that's similar? Maybe not, though. Features provide actual value, whereas marketing is ... tricksy.

Re:Nginx reaches 33.3% web server market share while Apache ... by btb on Monday April 10, 2017 @08:44PM (#14083913)
Apache httpd "legacy"? Seems a bit exaggerated. As far as I can tell it works just fine, have plenty of very good tutorials(like those from digital ocean), performance wise no problems(at least for our usage). And seems simpler to setup.

At my work we use IIS for our main website, but I've been asked to setup and configure a few wordpress installations. I've played around with both nginx and apache, but it was much easier to find clear instructions to setup wordpress on apache, so thats what I went with. I also really like apaches .htaccess support. Easy to lock down access to wp-admin by just dropping a .htaccess file in there restricting access to local ip range, instead of having to pollute the nginx config file with that sort of thing.

Re:Nginx reaches 33.3% web server market share while Apache ... by diminoten on Tuesday April 11, 2017 @01:29AM (#14085087)
"works just fine" is completely orthogonal to "legacy", same as "well documented", etc.

The way you're writing, you sound like you've tried one (Apache), and not really the other (nginx) and are basing your opinion on that, not on any merit-based evaluation...

[dead]
Re:Nginx reaches 33.3% web server market share while Apache ... by sctb on Tuesday April 11, 2017 @03:15PM (#14091416)
When users have flagged comments for violating the guidelines, please don't post them again.