Hail to the king of of the lightweight web!
March 03, 2018
Hail to the king of of the lightweight web!
Score 10 out of 10
Overall Satisfaction with Nginx
Nginx is powering the serving of web content across our entire organization. We used to host over a hundred web servers with Rackspace Cloud all with nginx sitting in front of backend server processes. Now, we host the majority of our sites on Pantheon, who also utilize nginx in their app server layer. We also host a number of custom servers on AWS EC2 which serve web content over nginx. It allows us to squeeze more performance from our web servers much more easily than using Apache.
- Nginx is typically blazing fast. It's hard for other web servers to touch it in terms of raw speed and efficiency.
- Nginx has a simple and intuitive configuration language which is easier for me to keep in my head than the more verbose Apache syntax.
- Nginx is very powerful as a web server, offering the ability to utilize many of the same features as Apache, sometimes in even better ways.
- Nginx works great as a reverse proxy, too! It can sit in front of a separate server, or even a cluster of servers, and intelligently handle serving requests to and responses from those servers, including a highly-configurable caching layer.
- Nginx often requires some initial configuration. It's worth doing, because you'll end up with great results, but it can be slightly daunting for someone to get started using it. Apache might have a leg up in that regard--When you install Apache, typically it's just about ready to do what you want already. But the issue with Apache is that most people skip the extensive tuning phase required after that, and with nginx it becomes more just a part of the configuration process.
- Sometimes, the configuration syntax, even though it's powerful and terse, isn't the most intuitive. Luckily there's plenty of documentation about what things mean and how to accomplish certain things. There may not be much that can be done about this--to have a powerful web server, you need a powerful-enough configuration language.
- The nginx brand is somewhat fragmented, and it can be confusing. There's the open source nginx web server, which I've primarily been referring to. But then there's NGINX Plus, a premium subscription-based service which works with a range of other NGINX products (NGINX WAF, NGINX Amplify, NGINX Controller). I've met a number of people who weren't very familiar with nginx, and instinctively went to nginx.com first, and from there it seems like everything costs money. It's only when they realize there's a different site, nginx.org, that they find what they went looking for.
- Nginx has decreased the burden of web server administration and maintenance, and we are spending less time on server issues than when we were using Apache.
- Nginx has allowed more people in our company to get involved with configuring things on the web server, so there's no longer a single point of failure ("the Apache guy").
- Nginx has given us the ability to handle a larger number of requests without scaling up in hardware quite so quickly.
- Apache and Microsoft IIS
Nginx struck the right balance for us of raw speed, power, convenience, and simplicity.
- I don't like the idea of hosting all of our open source PHP-based websites on Microsoft Windows servers with IIS, so that option was out first.
- Next, we had experience with Apache already, and were initially considering sticking with that, however it was decided that it would take too much administration time to properly configure and tune the server, especially considering it would need to occur on an ongoing basis.
- I've personally had experience with Litespeed Web Server, but we wanted something a little bit lower level--we don't need to actually manage our virtual hosts within an admin UI, and we wanted to stick with open source as much as possible. One huge benefit of Litespeed, however, is that it's .htaccess-compatible, meaning it's a much smaller transition from Apache in some cases.
- LightTPD was the closest contender to Nginx when all was said and done. We chose Nginx because some of us were more familiar with it or had some experience with it, and Nginx seemed to have more documentation and resources online for finding assistance at the time.
More often than not, if someone is looking to me for a web server recommendation, I'm going to recommend nginx. If your needs are within the 90+% majority of web server needs I've encountered out there, then in many cases nginx makes for a wonderful solution. Certain software, however, was designed to work with Apache and .htaccess files and may take substantially more effort to "convert" over to work with Nginx. In those cases, it might make sense to stay with Apache or with something else that is compatible with Apache's .htaccess files.