Apache takes up more memory resources and handles slower
All Apache modules support dynamic static compilation.
Apache's support for fcgi is bad.
Apache does not support Epoll
Apache is a monster relative to Nginx
Nginx is the opposite, Nginx occupies less memory, processing faster
Nginx modules are statically compiled.
Nginx support for fcgi is very good
Nginx Support Epoll
Nginx installation package size is only hundreds of K
From the above you can see the advantages of Nginx. Performance is higher than Apache.
Handles static files, index files as Webserver,nginx. Self-active indexing is highly efficient.
As a proxy server. Nginx can achieve non-cached reverse proxy acceleration, improve site execution speed.
As a load balancer, Server,nginx can support both rails and PHP internally, as well as HTTP proxy server for external network service, while also supporting simple fault tolerance and the use of algorithms for load balancing.
In terms of performance. Nginx is specially developed for performance optimization and is highly efficient in implementation. It adopts the kernel poll model. Can support many other concurrent connections, the maximum can support 50,000 concurrent connections of the response, and only occupy very low memory resources.
In terms of stability, Nginx adopts phased resource allocation technology. Makes CPU and memory usage very low.
In terms of high availability, Nginx supports hot deployment, which is extremely fast to boot, enabling the software version number or configuration to be upgraded in the event of uninterrupted service. able to do 7 * 24-hour uninterrupted upgrade.
Nginx and Apache