1. lighttpd
Lighttpd is a program with very low memory overhead, low CPU usage, good performance, and rich modules. lighttpd is one of the better ones among the many OpenSource lightweight web servers. Supports FastCGI, CGI, Auth, output compression, URL rewriting, Alias and other important functions.
Lighttpd uses fastcgi to run php, which will use very few PHP processes to respond to a large amount of concurrency.
The advantage of Fastcgi is:
· From a stability point of view, fastcgi runs cgi in an independent process pool. If a single process dies, the system can easily discard it and then reassign a new process to run the logic.
· with out out out out out out out of safety out out of fastcgi and host server. The IO processing is still left to the host server, so that the host server can concentrate on IO. For an ordinary dynamic web page, the logical processing may only be a small part, and the static IO processing of a large number of pictures does not require the participation of the logic program at all (note 1)
· In terms of scalability, fastcgi is a neutral technical standard that can fully support processing programs written in any language (php, java, python...)
2. apache
apache is the world's No. A web server, according to a survey conducted by netcraft (
www.netsraft.co.uk), more than 50% of the world's web servers are using apache.In April 1995, the earliest apache (0.6. Version 2) is published and released by the Apache Group. The Apache Group is a non-profit organization that operates entirely through the Internet. It determines what content should be included in the standard distribution of the Apache web server. Anyone is allowed to modify hidden errors and provide new ones. Features and porting it to new platforms, among other tasks. When new code is submitted to the Apache group, the group reviews its specific content, tests it, and if it is satisfied, the code is integrated into Apache Among the major distributions.
apache features:
1) Can run on almost all computer platforms.
2) Supports the latest http/1.1 protocol
3) Simple and powerful file-based configuration (httpd.conf).
4) Support common gateway interface (cgi)
5) Support virtual host.
6) Support http authentication.
7) Integrate perl.
8) Integrated proxy server
9) The status of the server can be monitored through a web browser, and the log can be customized.
10) Supports server-side inclusion commands (ssi).
11) Supports secure socket layer (ssl).
12) Has user session process Tracking capabilities.
13) Support fastcgi
14) Support java servlets
3.nginx
Nginx is a very lightweight HTTP server written by Russians, Nginx, it is pronounced as "engine X", is A high-performance HTTP and reverse proxy server, as well as an IMAP/POP3/SMTP proxy server. Nginx was developed by Russian Igor Sysoev for the second most visited Rambler.ru site in Russia.
Nginx is written in an event-driven manner, so it has very good performance and is also a very efficient reverse proxy and load balancing. It has the performance that matches Lighttpd, but does not have the memory leak problem of Lighttpd, and Lighttpd's mod_proxy also has some problems and has not been updated for a long time. However, Nginx does not support running in cgi mode because it can reduce some program vulnerabilities caused by this. Therefore, FastCGI must be used to execute PHP programs.
nginx, as an HTTP server, has the following basic features:
Processing static files, index files and automatic indexing; turning on file descriptor buffering.
Cacheless reverse proxy acceleration, simple load balancing and fault tolerance.
FastCGI, simple load balancing and fault tolerance.
Modular structure. Including gzipping, byte ranges, chunked responses, and SSI-filter and other filters. If multiple SSIs present in a single page are processed by FastCGI or another proxy server, this processing can run in parallel without waiting for each other.
Nginx is specially developed for performance optimization. Performance is its most important consideration, and implementation pays great attention to efficiency. It supports the kernel Poll model and can withstand the test of high load. Reports indicate that it can support up to 50,000 concurrent connections.
Nginx has high stability. When other HTTP servers encounter access peaks, or someone maliciously initiates a slow connection, it is also likely to cause the server's physical memory to be exhausted, frequent swapping, and loss of response, and the server can only be restarted. For example, once apache currently has more than 200 processes, the web response speed will be obviously very slow. Nginx adopts phased resource allocation technology, which makes its CPU and memory usage very low. nginx officially states that it maintains 10,000 inactive connections and it only occupies 2.5M of memory, so attacks like DOS are basically useless to nginx. In terms of stability, nginx is better than lighthttpd.
Nginx supports hot deployment. It is particularly easy to start, and can run almost 24/7 without any interruption, even if it runs for several months, it does not need to be restarted. You can also upgrade the software version without interrupting service.
server |
Apache |
Nginx Lighttpd |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
very good | Good Fcgi |
bad |
good |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hot deployment |
Not supported |
Supported |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The system pressure is relatively high |
Very small |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
stability |
good |
very good |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
safe Sex |
Good |
Average |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
technical support |
very good |
rare |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Static file processing |
average |
very Good |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Vhosts virtual host |
Supported |
Not supported |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Reverse proxy |
average |
very Good |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Session sticky |
Supported |
Not supported |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Note: On a relatively larger website, the server cost saved is undoubtedly objective. Some small websites often don't have many servers. If they use traditional web servers like Apache, they seem to be able to survive. But it has obvious disadvantages: Apache is easily overloaded when dealing with traffic bursts (such as crawlers or Digg effects). In this case, Nginx is most suitable. Recommended solution:Apache backend server (mainly handles php and some function requests such as: Chinese url) Nginx front-end server (use it to occupy less system resources Gain the advantage to handle a large number of requests for static pages) Lighttpd image server In general, with the improvement of nginx, it will become the mainstream of web server in the future. We will test the response time of 3 kinds of software in response to requests and concurrency of dynamic pages and static pages respectively l -c (ab parameter)
|