Performance load comparison of Lighttpd, nginx, and Apache

Source: Internet
Author: User

Recently I learned about how to build a website system and met Lighttpd, nginx, and Apache. apache knows that it is similar to a website platform in IIS.

For Lighttpd, nginx first heard it and compared it with the next one in the search! Reprinted and shared with you.

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.

Supplement:Squid cache (squid for short) is a popular free software (GNU General Public License) proxy server and Web Cache Server. Squid has a wide range of uses. It increases the speed of web servers by caching requests on the front cache server as a Web server, and caches the World Wide Web for a group of people to share network resources, domain Name System and other network search, to help network security by filtering traffic, to the LAN through the proxy to access the Internet. Squid is designed to run in UNIX systems.

Squid has a long history and has complete functions. In addition to HTTP, FTP and HTTPS support is also quite good, and IPv6 is also supported in Beta 3.0.

Select High-Performance Web Server 
Apache is the core Web server of lamp architecture. It is an open source, rich in modules, powerful functions, and stable.

100 of the top 49% websites in the United States use Apache. Its influence can be seen. However, there are advantages and disadvantages. The fatal defect of Apache is that it is more bloated and powerful, which will definitely bring performance loss. In the face of this situation, there is a sudden emergence in the market, that is, a more lightweight Web server-lighty (Lighttpd ). The official definition for it is fly light. It features low memory overhead, low CPU usage, good performance, and rich module support. This gives him a market share of more than 14% in a short time. More and more people are choosing lighty as the front-end web server. Here, in fact, high-performance Web server is not lighty. But even better, relying on Gentoo's high customization, we can further improve lighty's performance potential-that is, customizing lighty.

Select high-performance script language
Scripting languages that can be combined with lighty include Ruby, PHP, Python, and Perl. The access method is mainly through fast-CGI. Compare several languages from the performance perspective only:


Http://www.timestretch.com/FractalBenchmark.html)

Python is the best script language in this test.
Dynamic processing has an absolute advantage. Compared with PHP, the former can render the output content faster and cache the content to the browser through lighty and high-speed flush.
It is worth mentioning that Douban.com also uses python as the application server.

To sum up, what is llmp?
Llmp is a combination of Linux lighty MySQL Python and exists as a high-performance website architecture design.

what is high-performance llmp?
llmp does not mean high performance, but has more potential to improve performance than other architectures. High-performance llmp requires collaboration between systems, programs, and hardware.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.