Nginx is a small and efficient web server software in Linux. The developer Igor Sysoev is from Russia. nginx has been running on some large Russian websites for many years and is quite stable. Recently, it has become well-known in the United States.
Another popular web server software is Lighttpd, which is well-known because it runs on the background of YouTube. Lighttpd features flash streaming and FastCGI support.ProgramIt is much faster than Apache.
However, nginx is more stable than Lighttpd, and its functions are not inferior to Lighttpd. There are almost everything available, and its support for URL rewrite is better than Lighttpd.
Whether it is nginx or Lighttpd, it is much better to provide static files than Apache, mainly because it occupies a small amount of memory. Apache and these two small server software are really a giant.
Even for websites dynamically generated by most of the content, there are still some static elements, such as slice, JS scripts, CSS, etc. Placing squid on the Apache or lighttp front-end will lead to performance degradation, after all, processing HTTP requests is the strength of web servers. In addition, static content that already exists in the file system is cached in Squid, which wastes memory and hard disk space. Therefore, you can consider placing Lighttpd in front of squid to form a processing chain of Lighttpd + squid + Apache. Lighttpd is at the very beginning and is used to process static content requests, the dynamic content request is forwarded to Squid through the proxy module. If the content of the request in Squid does not expire, it is directly returned to Lighttpd. New requests or expired page requests are handled by the Apache web program. After Lighttpd and squid filtering, Apache will greatly reduce the number of requests to be processed, reducing the pressure on Web applications. At the same time, this architecture allows for different processing to be distributed across multiple computers, and the Lighttpd checks each other.
this article from: ixpub technical community (www.ixpub.net) detailed source reference: http://www.ixpub.net/thread-771079-1-1.html