What Is Nginx? What It Is and How It Works
Omar Ismail
Senior Software Engineer @ Digitinary | Java & Spring Expert ? | AWS & Microservices Architect ? | FinTech & Open Banking Innovator ?? | Digital Payments Expert ?? | Top 200 IT Content Creator in Jordan ?? | 40K+ ??
NGINX, which is pronounced as?‘engine ex,’ is a widely used open-source web server software. It was a project started by Igor Sysoev in 2002. It got officially released in October 2004. It was created to solve the problem of C10k, which is defined as a challenge to manage the ten thousand connections all at the same time.
What is NGINX?
NGINX is a web server but commonly used as a reverse proxy. It can be scaled efficiently as a web server as well as a reverse proxy. It does not allow you to allocate a process to a particular connection, but it creates a process pool that can be easily shared among multiple connections within the network. Whenever a request is made, a resource will be allocated to the process resulting in better resource utilization that can easily handle extensive connections.
NGINX also helps in setting up a secured connection between your data-centers and the outside network. It also works well as an HTTP load balancer that allows you to use multiple different load-sharing mechanisms.
Advantages of using NGINX
Disadvantages of using NGINX
How Does Nginx Work?
Nginx is built to offer?low memory usage?and high concurrency. Rather than creating new processes for each web request, Nginx uses an asynchronous, event-driven approach where requests are handled in a single thread.
With Nginx, one master process can control multiple worker processes. The master maintains the worker processes, while the workers do the actual processing. Because Nginx is asynchronous, each request can be executed by the worker concurrently without blocking other requests.
Some common features seen in Nginx include:
Nginx vs Apache Usage Stats
Apache?is another popular open-source web server. In terms of raw numbers, Apache is the most popular web server in existence and is used by 43.6% (down from 47% in 2018) of all websites with a known web server,?according to W3Techs. Nginx comes in a close second at 41.8%.
Netcraft ran a?survey?across 233 million domains and found Apache usage at 31.54% and Nginx usage at 26.20%.
领英推荐
While Apache is the most popular overall option,?Nginx is actually the most popular web server among high-traffic websites.
When you break down usage rates by traffic,?Nginx powers:
In fact, Nginx is used by some of the most resource-intensive sites in existence,?including Netflix, NASA, and even WordPress.com.
Apache’s usage, on the other hand, moves in the opposite direction as a site’s traffic increases. It powers:
If we take a look at?Google Search terms?since 2004 we can see that Apache has been on a steady decline, while NGINX has seen slight growth.
Again, when you consider that NGINX performs better under scale, it’s not surprising that high-traffic websites opt for NGINX over Apache. Check out our more in-depth comparison of?Nginx vs Apache.
Why use NGINX?
You can use NGINX for many reasons, and some of them are mentioned below.
How to Check If You’re Running Nginx or Apache
On most websites, you can simply check the?server?HTTP header to see if it says Nginx or Apache. You can see HTTP headers by launching the network tab in Chrome Devtools. Or you can check headers in a tool like?Pingdom?or?GTmetrix.
However, the HTTP header might not always reveal the underlying web server. For example, if your WordPress site is behind a proxy service such as Cloudflare, the?server?HTTP header will then say cloudflare instead.
Building @CrysPay on Aptos | ?? @RouterProtocol | Degree-ing ?? | Flutter + Web3?? | Pythoneer | DappDev | Sanskrit ????????| Contributor @PSF |
2 年??????
Je cherche ma voie....
2 年Nanfack Tadonke Arsene Parfait Have a look remenber the project....
Thanks for posting
Very informative post. ????