Skip to content

Nginx

What is nginx?

Nginx is open source web server software, it also works as a reverse proxy for other web servers. With the Apache web server, they have the most jobs for websites. The Nginx web server even tends to take the lead. However, Apache is not for all that neglected. Both correspond to different scenarios, the combination of the two servers proves to be an optimal solution in some cases. The commercial version Nginx Plus offers more features, more efficient technical support and richer documentation.

Nginx owes its origin to the Russian Igor Sysoev in 2002. However, it wasn’t until 2004 that its official launch took place. The initial development of Nginx was to meet high traffic needs, more specifically a performance problem related to handling 10,000 simultaneous connections (c10k problem). The designers of nginx succeeded in solving this problem by opting for an asynchronous and event-driven architecture. Thanks to this, Nginx is able to efficiently manage a large number of concurrent connections.

What are the main features of the Nginx web server

Since its inception, Nginx has worked with BSD, Mac OS X, GNU / Linux operating systems and later on Windows. Little known in its early days except in Russia, Nginx rose in popularity after its translation to English in 2006. Since then, its ability to deliver high performance, use minimal memory resources, and handle static content without the added cost has won over many. Making it the favoured web server for the websites that generate the most traffic.

Depending on the scenario, it may work on its own to perform the task of a web server for managing static content. Or else, being deployed as a proxy for other servers to protect them from very high traffic or certain DDOS attacks. To be brief, it is best suited for managing static content sites. Nevertheless, it can be associated with Apache for instance, for sites associating dynamic and static content in addition to the high number of simultaneous connections.

Comparison of Nginx and Apache

Apache has long been the go-to web server. However, its limitations led users to look to other solutions. Nginx managed to provide this performance and even took the place of Apache in some cases.

Although both software can serve web pages, there are important features that differ them. The most important is their architecture. Apache takes a process-oriented approach, meaning that every request has a corresponding thread. Instead, Nginx opts for an event-driven approach. Thus, a single thread can process several requests. This model gives Nginx a performance gain for few resources consumed.

In terms of flexibility, an important characteristic of a web server, Apache offers strong customization thanks to its many additional modules. Nginx, on the other hand, does not allow this ultra customization yet. Regarding security, the two servers, thanks to their bases in C code, have proven to provide optimal security against various hacks and threats.

In conclusion, each server is better suited to one need than the other. Despite the popularity of Nginx, the choice of its use must be made after a real study and not under the influence of hype, whether its for web hosts or smaller projects.