One. Software (apache lighttpd nginx)
1. lighttpd
Lighttpd is a very low memory overhead, cpu occupancy rate is low, good performance, and a wealth of modules and so on. lighttpd is one of many OpenSource lightweight web server in one of the more outstanding. Support FastCGI, CGI, Auth, Output compression (output compress), URL rewriting, Alias and other important functions.
Lighttpd fastcgi run using php, it uses very little of the PHP process in response to a large amount of concurrency.
Fastcgi advantage is that:
· From the stability point of view, fastcgi pool is a separate process to run cgi, single process dies, the system can be easily discarded, and then re-assign a new process to run logic
-from security point of view, fastcgi and completely independent of the host server, fastcgi how down would not bring down the server,
·, fastcgi dynamic logic of the process is separated from the performance point of view from the server, IO handle large loads or left to the host server so the host server can be single-minded as IO, for an ordinary dynamic web pages, the logic may be only a small part of a large number of pictures and other static IO process completely without logic involved in the program (Note 1)
· scalability from speaking , fastcgi is a neutral technology standards, can support any programming language to write processing (php, java, python ...)
2. apache
apache is the world's number one web server, according to Netcraft ( www.netsraft.co.uk survey) made the world more than 50 percent of the web server using apache.
In April 1995, the earliest apache (0.6.2 version) published by the apache group issue. Apache group is a fully operate through the internet non-profit organization, it is determined by the standard distribution apache web server which should contain allow any person to modify bugs, provide new features and porting it to new platforms, as well as other work. when a new code is submitted to the apache group, the group reviewed its specific content, test, if the satisfaction, the code will be integrated into the main release of apache.
apache features:
1) almost run on all computer platforms.
2) Support for the latest http / 1.1 protocol
3) simple and powerful configuration file (httpd.conf) based.
4) supports Common Gateway Interface (cgi )
5) supports virtual hosts.
6) support http authentication.
7) integrated Perl.
. 8) integrated proxy server
9) can be custom log by state web browser monitoring server
10) to support server-side include command (SSI ).
11) to support secure socket layer (SSL).
12 is) having the ability to track a user's session.
13) supports FastCGI
14) supported java servlets
3. nginx
Nginx Russians prepared very lightweight HTTP server, it's pronounced "engine X", is a high-performance HTTP server and reverse proxy, but also a IMAP / POP3 / SMTP proxy server. Nginx by Igor Sysoev of Russia who visited the second site development Rambler.ru Russia.
Nginx event-driven approach to the preparation, so there is a very good performance, but also a very efficient reverse proxy, load balancing. Lighttpd has matched its performance, but also no Lighttpd memory leaks, and Lighttpd's mod_proxy there are some problems and has not been updated for a long time. However, Nginx does not support cgi run, because of loopholes in some of the programs can reduce therefore brings. It is necessary to execute the program using PHP FastCGI mode.
nginx as HTTP server, have the following basic characteristics:
static files, index files, and automatic indexing; open file descriptor buffer.
No caching reverse proxy to accelerate, simple load balancing and fault tolerance.
FastCGI, simple load balancing and fault tolerance.
The modular structure. Including gzipping, byte ranges, chunked responses, and SSI-filter like filter. If present in the plurality of SSI or other proxy processing FastCGI single page, then the process can be run in parallel, without the need to wait for each other.
Nginx designed for performance optimization and development, performance is the most important consideration, very focused on efficiency achieved. It supports kernel Poll model, able to withstand the test of high load, it has been reported that can support up to 50,000 concurrent connections.
Nginx with high stability. Other HTTP server, when faced with the peak access, or someone maliciously initiated a slow connection, it is likely to cause the server to run out of physical memory frequent exchange loss of response, only to restart the server. For example, once the current apache process to more than 200, web response speed is obviously very slow. The Nginx has taken a phased resource allocation technology, making its CPU and memory usage rate is very low. nginx officials said no activity to keep 10,000 connections, it accounts for only 2.5M of memory, so DOS attacks like this for nginx is basically useless. In terms of stability, nginx than lighthttpd better.
Nginx supports hot deployment. It's particularly easy to start, and can be done almost 7 * 24 uninterrupted operation, even running a few months does not require a reboot. You can also in the case of uninterrupted service, the software version upgrade.
Two .3 kinds WEB Comparative server
server | Apache | Nginx | Lighttpd |
Proxy Agent | very good | very good | general |
Rewriter | it is good | very good | general |
Fcgi | not good | it is good | very good |
Hot deployment | not support | stand by | not support |
The system pressure is relatively | Great | Small | smaller |
stability | it is good | very good | not good |
safety | it is good | general | general |
Technical Support | very good | Seldom | general |
Static file handling | general | very good | it is good |
Vhosts Web Hosting | stand by | not support | stand by |
Reverse Proxy | general | very good | general |
Session sticky | stand by | not support | not support |
Note: In the relatively relatively large site, server cost savings undoubtedly objective. And some small sites are often small server, if such traditional Apache Web server, but also seem to stay in the past. But its obvious drawbacks: Apache in dealing with the outbreak of traffic (such as reptiles or Digg effect) it is easy to overload, using Nginx most appropriate under such circumstances.
Proposal:
- Apache backend server (php and mainly deal with some of the features requested such as: Chinese url)
- Nginx front-end server (use it to get the advantages of occupying less system resources to handle the large number of requests static page)
- Lighttpd image server
Overall, with nginx function was perfect in the future will allow him to become too mainstream web server.
The major sites WEB server resource list
The name of the server operating system web site
1. Portal categories:
Sohu LINUX apache 1.3.37
Sina LINUX apache 2.0.54
Thunder nginx 0.6.31 LINUX
163 LINUX the Apache 2.2.6
2. Search class
Baidu BWS 1.0 Unknown
Google Linux GWS
Sougou the Apache FreeBSD 2.2.4
Hao123 the Apache Linux 2.2.4
4. E-mail class
126 Linux the Apache
Hotmail Win2003 in the Microsoft-IIS 6.0
Sina-mail Big-IP the Apache 2.2.8 F5
263 the Apache Linux 2.2.6
The blog category
Sina blog linux nginx 0.5.35
Sohu blog linux nginx
Thunder blog linux nginx 0.6.32
End of the World blog F5 Big-IP Microsoft-IIS / 5.0
6 . Video Class
Youku linux apache
potatoes linux apache
Ku6 linux apache
six rooms linux nginx 0.6.14