What the heck is NGINX?
Today we will be covering NGINX, an open source web server and the main alternative and competitor to the Apache HTTP Server.
NGINX has been gaining in popularity since its inception and is used across a wide spectrum of applications for web serving, reverse proxying, caching, load balancing, media streaming, and much more.
NGINX, pronounced as “engine-ex,” is a famous open source web server software. In its initial release, it functioned for HTTP web serving. Today, however, it also serves as a reverse proxy, HTTP load balancer, and email proxy for IMAP, POP3, and SMTP.
Quick History of NGINX
NGINX got its official release on October 2004. The creator of the software, Igor Sysoev, started his project in 2002 as an attempt to answer the C10k problem. C10k is the challenge of managing ten thousand connections at the same time. Today, there are even more connections that web servers have to handle. For that reason, NGINX offers an event-driven and asynchronous architecture. This feature makes NGINX one of the most reliable servers for speed and scalability.
How does traditional server work?
When someone makes a request to open a webpage, the browser contacts the server of that website. Then, the server looks for the requested files for the page and sends it to the browser. This is only the simplest kind of request. Traditional web servers create a single thread for every request, but NGINX does not work that way.
How does NGINX work?
As stated before, NGINX performs with an asynchronous, event-driven architecture. It means that similar threads are managed under one worker process, and each worker process contains smaller units called worker connections. This whole unit is then responsible for handling request threads. Worker connections deliver the requests to a worker process, which will also send it to the master process. Finally, the master process provides the result of those requests.
That may sound simple, but one worker connection can take care of up to 1024 similar requests. Because of that, NGINX can process thousands of requests without any difficulties. It is also the reason why NGINX became excellent for busy websites like e-commerce, search engines, and cloud storage.
Due to its superb ability to handle a lot of connections and speed, many high traffic websites have been using NGINX’s service. Some of these online giants are Google, Netflix, Adobe, Cloudflare, WordPress.com, and many more.