Nginx (pronounced “engine-x”) is a high-performance, open-source web server and reverse proxy server. It’s designed to handle many simultaneous connections efficiently using a lightweight, event-driven architecture. NGINX is the most popular open source web server for high-traffic websites, powering over 140 million overall. NGINX Plus is the fully supported, commercial version of NGINX. It includes the NGINX open source modules and adds enterprise-class features such as application load balancing, health checks, streaming media delivery, activity monitoring and on-the-fly reconfiguration.
The nginx project started with a strong focus on high concurrency, high performance and low memory usage. It is licensed under the 2-clause BSD-like license and it runs on Linux, BSD variants, Mac OS X, Solaris, AIX, HP-UX, as well as on other *nix flavors. It also has a proof of concept port for Microsoft Windows. According to Netcraft nginx served or proxied 17.82% busiest sites in April 2014.
Why use Nginx?
You’d choose Nginx mainly for:
• High performance under heavy load
• Low memory usage
• Handling thousands of concurrent connections
• Efficient static file serving
• Modern architecture (event-driven, non-blocking)
When should you use nginx?
Nginx is a great fit when:
• You expect high traffic websites or APIs
• You need a reverse proxy or load balancer
• You’re building microservices architecture
• You want to serve static content very fast
• You’re deploying cloud-native apps (Docker, Kubernetes)
Less ideal when:
• You rely heavily on .htaccess (Nginx doesn’t support it)
• You want very dynamic per-directory configs without reloads
Key components of Nginx
1. Master & Worker Processes
• Master process → manages configuration and workers
• Worker processes → handle actual requests
2. Event-driven architecture
• Uses asynchronous, non-blocking I/O
• Handles many connections in a single worker
3. Configuration system
• Centralized config file (nginx.conf)
• No per-directory config like Apache
4. Modules
Built-in and compiled modules (not as dynamic as Apache)
Examples:
• HTTP module
• Stream module (TCP/UDP)
• Mail module
Key features of Nginx Server
• Reverse proxy and load balancing
• High concurrency handling
• Static file serving (very fast)
• SSL/TLS termination
• URL rewriting and redirects
• Caching (proxy cache, fastcgi cache)
• Rate limiting
• HTTP/2 and HTTP/3 support
Advantages
• Extremely fast and efficient
• Low resource usage
• Great for scaling systems
• Handles concurrent users better than Apache
• Ideal for modern architectures
Disadvantages
• No .htaccess support (less flexible for shared hosting)
• Configuration can feel less intuitive at first
• Dynamic module support is more limited than Apache
• Some legacy apps expect Apache behavior
More details about Nginx
Nginx can be deployed to serve dynamic HTTP content on the network using FastCGI, SCGI handlers for scripts, WSGI application servers or Phusion Passenger module, and it can serve as a software load balancer. Its development started in 2002 by Igor Sysoev. In July 2011, a company was formed as Nginx, Inc. Its principal place of business is San Francisco, California. The company offered commercial support in February 2012, and paid NGINX Plus subscription in August 2013. An investment of $10 million led by New Enterprise Associates was reported in October 2013. Other investors reportedly included Aaron Levie. WordPress developer Automattic and Content Delivery Network provider MaxCDN have become funding partners for an update to Google's SPDY version 3.1, slated for early 2014.
Nginx uses an asynchronous event-driven approach to handling requests, instead of the Apache HTTP Server model that defaults to a threaded or process-oriented approach, where the Event MPM is required for asynchronous processing. Nginx's modular event-driven architecture can provide more predictable performance under high loads.
Originally, nginx was developed to fill the needs of websites including Rambler, for which it was serving 500 million requests per day by September 2008. According to Netcraft's February 2014 Web Server Survey, nginx was found to be the third most widely used web server across all domains (15% of surveyed sites) and the second most widely used web server for all "active" sites (13.46% of surveyed sites). According to W3Techs, it was used by 21.5% of the top 1 million websites, 29% of the top 100,000 websites, and by 38.5% of the top 1,000 websites. According to BuiltWith, it is used on 20.8% of the top 10,000 websites, and its growth within the top 10k, 100k and 1 million segments increased. Wikipedia uses nginx as its SSL termination proxy. As of OpenBSD release 5.2 (1 November 2012), nginx became part of the OpenBSD base system, providing an alternative to the system's fork of Apache 1.3, which it was intended to replace. Eventually, Apache was removed from the base system.
HTTP proxy and Web server features of Nginx
• Ability to handle more than 10,000 simultaneous connections with a low memory footprint (~2.5 MB per 10k inactive HTTP keep-alive connections)
• Handling of static files, index files, and auto-indexing
• Reverse proxy with caching
• Load balancing with in-band health checks
• Fault tolerance
• TLS/SSL with SNI and OCSP stapling support, via OpenSSL.
• FastCGI, SCGI, uWSGI support with caching
• Name- and IP address-based virtual servers
• IPv6-compatible
• SPDY protocol support
• WebSockets and HTTP/1.1 Upgrade (101 Switching Protocols)
• FLV and MP4[28] streaming
• Web page access authentication
• gzip compression and decompression
• URL rewriting
• Custom logging with on-the-fly gzip compression
• Response rate and concurrent requests limiting
• Bandwidth throttling
• Server Side Includes
• IP address-based geolocation
• User tracking
• WebDAV
• XSLT data processing
• Embedded Perl scripting