Nginx - top contender in the web server game

May 17, 2018 by Dragos

There are three important competitors on the web servers market: Apache, IIS and Nginx. The former two have a large, established user base thanks to the quality of their services and customer support. On the other hand, the latter provides a different approach for managing tasks and resources.

From a software perspective, a web server helps deliver content (like a webpage) to internet users and this is usually achieved using the Hypertext Transfer Protocol (HTTP). As a result, a user's online experience greatly depends on the quality of the web server as well as on how fast it can process and solve large requests on a frequent basis. That is why, as a developer, it is important to carefully choose the proper web server when building a web application.

Thanks to an architecture capable of handling more than 10k requests per second, combined with premium versions and 24x7 customer support, Nginx is a first choice for many large, high-traffic websites. For example, its official website lists Dropbox, WordPress, Cloudflare, and even NASA as sites hosted using this web server solution. Its leadership claims that over one third of the world’s most popular websites are hosted via Nginx, which is quite an achievement in a rather short amount of time.

Nginx is a well-known open-source web server that has undergone a rapid growth in popularity. Even at this point it looks like the growth is sustainable, so this software will keep on catching up with both Apache and IIS. Additionally, more and more web applications (websites), especially those with a high traffic, are switching to Nginx.

Why Nginx is becoming so popular

Nginx’ high performance, efficiency and stability are achieved through its architecture. It works differently than other web servers, considering it has an event-driven, asynchronous architecture. This way, it does not need to start new processes in order to handle new requests (as other web servers do), which result in only a couple MB of RAM usage. On the other hand, Apache has a thread-driven architecture that, under high loads times (for example C10k problem), causes load spikes and will consume too much RAM.

Also, Nginx is very efficient and can be used even on virtual machines that have limited resources, which would be a challenge for other web servers. Moreover, the more experienced software developers are able to consolidate their existing web servers by integrating other features of Nginx. The application can be successfully configured as a reverse proxy, HTTP cache or as a load balancer.

What is it like to migrate to Nginx?

Migrating to Nginx does not pose many issues. However, developers must first familiarize themselves with the new server and its specific design. Also, guides and documentation are not abundant, so configuring the web server can be time consuming, especially because the "familiar" .htaccess files are not supported. Another downside would be the lack of a module creating function like Apache's APR (Apache Portable Runtime). Instead, developers have no other option than to search for such a function within the server's internal code.

Overall, Nginx has proven to be a reliable server and its popularity is not a small feat to achieve. It is clear that improving future web servers requires the developers to think “out of the box” in order to find more efficient ways to design them.

Anyway, even though we still favor IIS for most of our projects, we believe that Nginx has a bright future in the industry.


Tags: No tags.


Comments

No comments yet.

Your Comment:






Blog Home   SBP Home
RSS Feed       Contact




Archives




 Blog Archives  |  Terms of Use  |  Privacy Policy
© 2018 SBP Romania. All rights reserved.