nginx Getting started with nginx Nginx inside


One of the biggest appeals of Nginx is the difference in how it works internally as compared to the other popular servers, specially Apache.

Servers are busy programs as they have to serve requests from multiple clients. The more requests a server can successfully serve per second, the better.

Nginx works on a concurrency paradigm known as Asynchronous IO.

In a conventional server, one thread is dedicated to one request. This means, once a thread takes up a request, it is effectively unavailable for other requests. But in reality, a thread could do a lot better by accepting a bunch of requests and serving them simultaneously. Asynchronous IO is what enables this.

Nginx, therefore with its Asynchronous IO architecture, can serve many requests within one thread.

Another good thing about Nginx is its relatively leaner resource footprint. Compared to Apache, Nginx is less resource heavy, and this makes it suitable to cloud servers what tend not to be very powerful.

There are certainly other Async IO server out there, but Nginx is the most well supported among all in terms of pluginx (aka Nginx Modules).