NGINX

NGINX is one of the most popular web servers. It can be used as a load balancer, HTTP cache, reverse proxy, and shock absorber. It has a capacity for handling more than 10,000 simultaneous connections with a very low footprint (approximately 2.5 MB per 10,000 inactive https://en.wikipedia.org/wiki/HTTP_persistent_connection). It was specifically designed to overcome Apache. It can roughly handle four times more requests per second than Apache. NGINX can be used in various ways, such as the following:

  • Deployed standalone
  • As a frontend proxy for Apache acting as a network offload device
  • Act as a shock absorber, providing servers from a sudden spike in traffic or slow internet connections

It is our perfect fit for microservice applications, as containerized microservice applications need a frontend that is able to conceal and deal with the complex and ever-changing nature of applications running behind it. It performs some major things such as forward HTTP requests to different applications, shock absorber protection, routing, consolidated logging, Gzip compression, zero downtime, caching, scalability, and fault tolerance. Hence, it is our ideal application delivery platform. Let's begin NGINX 101.

Download the latest version from this site, http://nginx.org/en/download.html, based on your operating system. At the time of writing, the mainline Version was 1.13.7.

Once extracted, you can simply start NGINX as follows:

start nginx

To check whether NGINX is up or not you, can hit the following command in Windows:

tasklist /fi "imagename eq nginx.exe"

In the case of Linux, you can use the following command line:

ps waux | grep nginx

The following are other useful NGINX commands: