Live data from Hacker News

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

w3techs.com

111–120 of 190 posts

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

#111
post #87
post #82

Earlier quoted context omitted.

nginx is much more simple than full-service servers like Apache. Which is good if you want to do something easy fast (like terminate TLS, proxy, load-balance, simple redirect, simple header munging, etc.). And not good if you want to do something more complex and get into learning how nginx rewrite rules really work (totally not obvious), how if and other predicates really work (multiple articles in docs suggest it's…

Fair point, but, > if you want your webserver to do something complex, you'd go for Apache I would tend to disagree. Assuming "complex" = "business logic", Apache hardly seems the right choice. PHP/Python/Node/GoLang or Lua right inside nginx would be more appropriate in most cases, imo.

There are degrees of complexity, there's a kind of spectrum even. If you want a full-blown business logic that requires language like PHP or Go, it's insane to try and make Apache do it. If you need a set of simple rules that are within what Apache (including there all the module ecosystem) can and is designed to do, it would be a big mistake, costing a lot of scalability, to deploy high-level language instead. Right tool for the job, always.

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

#112
post #30

This is kind of a weird statistic to try to analyze. So many uses of nginx are just the act of putting an Apache/IIS/etc site behind nginx, so technically, both servers still have market share but you only see nginx. It's just that nginx makes it so easy to do certain things, like supporting modern HTTPS, that you might as well add it to your stack rather than replace something.

Agreed, I mean is a reverse proxy even a server? The number of people who use Nginx for load balancing is huge, so when they say people are switching to nginx from Node.JS, I'm just like: "Dude, I only use Nginx for my kubernetes ingress, with plenty of services behind using Node.JS rather than any monolithic everything server" So is my server Nginx, Kubernetes or Node.JS, or Python, or Java? :-/

I think this statistic is conceptually a little behind the times in some ways

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

#113
post #111
post #87

Earlier quoted context omitted.

Fair point, but, > if you want your webserver to do something complex, you'd go for Apache I would tend to disagree. Assuming "complex" = "business logic", Apache hardly seems the right choice. PHP/Python/Node/GoLang or Lua right inside nginx would be more appropriate in most cases, imo.

There are degrees of complexity, there's a kind of spectrum even. If you want a full-blown business logic that requires language like PHP or Go, it's insane to try and make Apache do it. If you need a set of simple rules that are within what Apache (including there all the module ecosystem) can and is designed to do, it would be a big mistake, costing a lot of scalability, to deploy high-level language instead. Right…

> if you want your webserver to do something complex, you'd go for Apache

> a set of simple rules that are within what Apache (including there all the module ecosystem) can and is designed to do

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

#114
post #107

Earlier quoted context omitted.

A good reason to use nginx (or better HAProxy), is to stop people from writing endless mess of redirect and rewrite rules.

Not many people do it just for fun. Stopping people from doing what they need to achieve job being done is usually not the most productive idea.

There are very few justified usages that require to write maze of rewrite rules.

Most people do it because they have no idea what they are doing and they never decided on a naming convention for their apps and domains.

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

#115
post #109
post #70

Earlier quoted context omitted.

nginx is turning into much more than just a load balancer. Projects such as OpenResty (a full CMS built into nginx) and Kong (an API management service), are built right into nginx using Lua. We've done some minor nginx Lua extensions and are looking to offload activities such as JSON validation into the front-end nginx. http://openresty.org/ https://getkong.org

By JSON validation do you mean just checking if it's well formed or rather something like JSON Schema validation? The latter seems tricky. It's validation inside the application a bottleneck?

I assume they mean JWT validation.

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

#116
post #70

Apache has historically been a giant swiss army knife that will do just about everything you could want, from redirect databases to cgi to php interpreters to crazy auth setups. It did all that while still being a reasonably good workhorse for static file serving (when properly turned and using the right worker model, event rather than threaded or process). Nginx seems to have a different model. It does support a num…

nginx is turning into much more than just a load balancer. Projects such as OpenResty (a full CMS built into nginx) and Kong (an API management service), are built right into nginx using Lua. We've done some minor nginx Lua extensions and are looking to offload activities such as JSON validation into the front-end nginx. http://openresty.org/ https://getkong.org

Kong is great, really like it

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

#117

Earlier quoted context omitted.

More like _humans_ shouldn't edit XML by hands, XML has it's strong points as a machine-friendly format.

Such as? At that point might as well just use a slimmer binary format without so horribly complicated parsing rules.

It hard to take a hardline stance on something with so much give and take.

XML is great because there are plenty of fast parsers for it with bindings in pretty every programming. It can be modified with nothing more than a text editor, by someone halfway competent.

XML is bad because it will never be quite as optimal as some binary only solution and editing with a test editor is painful.

Its not like most programming languages would have a hard time with gzipped xml either. This grants most of the benefits of binary formats and is often smaller than all but the most carefully designed ones.

All of that even presumes config load time matters. I a crazy large case maybe 10MB loads from a disk and the important stuff is cached in memory, in the actual structures that will use the data later. It just doesn't matter. Gzipped xml is fast enough for realtime high performance games, who cares about this silly XML hating anymore. Just pick something that works and move on.

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

#118

Huh, I'm surprised Apache is still so high? Are there huge hosting sites that use it or something? Wordpress? I (and I know no one) who has reached for Apache over NGINX in a decade.

Most of the cheap shared hosts: GoDaddy, 1&1, HostGator seem to be still using Apache. At least from what i've noticed with my clients

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

#119
post #85

Earlier quoted context omitted.

So, literally, Netcraft confirms Apache is dying.

For "dying" being defined as "increases installs but slower than the whole market balloons".

You must be new to the Internet.

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

#120

Apache has historically been a giant swiss army knife that will do just about everything you could want, from redirect databases to cgi to php interpreters to crazy auth setups. It did all that while still being a reasonably good workhorse for static file serving (when properly turned and using the right worker model, event rather than threaded or process). Nginx seems to have a different model. It does support a num…

> It did all that while still being a reasonably good workhorse for static file serving (when properly turned and using the right worker model, event rather than threaded or process).

event doesn't support HTTPS, or rather, it stops being event-based when you turn on HTTPS. So Apache can never be performant unless you have an SSL terminating proxy.

Its only advantage is that the config script is slightly easier to test, but it's still way too hard _and_ it's incredibly verbose compared to nginx config.

Post reply on HN