nginx (pronounced “engine x”) is an open source web server and a reverse proxy server for HTTP, SMTP,POP3, and IMAPprotocols, with a strong focus on highconcurrency, performance and lowmemory usage. It is licensed under a BSD-like license and it runs on Unix, Linux, BSD variants, Mac OS X,Solaris, AIX, HP-UX, and Microsoft Windows.
According to Netcraft‘s June 2013 Web Server Survey, nginx was found to be the third most widely used web server across all domains (14.56% of surveyed sites) and the second most widely used web server for all “active” sites (12.91% of surveyed sites). According to W3Techs, it is used by 16.8% of the top 1 million websites, and by 34.9% of the top 1,000 websites. According to BuiltWith, it is used on 16.7% of the top 10,000 websites, and its growth within the top 10k, 100k and 1 million segments is increasing.
As of OpenBSD release 5.2 (1 November 2012), nginx is part of the OpenBSD base system, providing an alternative to the system’s fork of Apache 1.3, which it is intended to replace eventually.
nginx uses an asynchronous event-driven approach to handling requests, instead of the Apache HTTP Server model that defaults to athreaded or process-oriented approach. nginx’s event-driven approach can provide more predictable performance under high loads.
Basic HTTP features
- 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
- SPDY protocol support
- WebSockets and HTTP/1.1 Upgrade (101 Switching Protocols)
- FLV and MP4 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
- XSLT data processing
- Embedded Perl scripting
Mail proxy features
- TLS/SSL support
- STARTTLS support
- SMTP, POP3, and IMAP proxy
- Authentication using an external HTTP server