Nginx is a tiny web server that features high concurrency support and multi-functionality.
Nginx Market Share
Its continually increasing market share tells you it may be a good choice to switch to Nginx. Apache and Windows Server are losing market while Nginx keeps gaining more. Nginx is currently the second most widely used web server for top million busiest sites according to
However, Nginx may not always better than Apache in speed. That’s because Nginx is itself a static resource web server. It uses IO multiplexing system call provided by Linux to manage concurrent HTTP connections.
Epoll , an O(1) time algorithm, is actually used as long as Linux supports it (http://nginx.org/en/docs/events.html) . Apache uses
select, an O(n) time algorithm.
- Web server (multiple hosts)
- Load balancer (reverse proxy)
- Web cache (local cache in front of static resources storage)
- High concurrency for small static resources. (10k to 20k concurrent connections)
- Low memory cost. (less than 1GB for 20k concurrent connections)
- Many applications, but not very strong for each one
- Support Epoll model, which increases high concurrency
- Collaboration with dynamic services.
- Limit speed based on IP; limit connections.
- Easy and flexible configuration.