Comparison of the server cluster technology

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

A software is introduced.(apache  lighttpd  nginx)

1. lighttpd

Lighttpd is a very low memory overhead, CPU occupancy rate is low, efficiency, and rich module etc.. Lighttpd is one of the many OpenSource lightweight web server is an excellent. Support FastCGI, CGI, Auth, output compression (output compress), URL rewriting, the important function of Alias.

Lighttpd uses the fastcgi mode PHP, it will use the little PHP process with a large quantity of the response.

The advantage of Fastcgi is that:

·Making making making making from the stability point of view, fastcgi is running as a separate process pool to CGI, a single process dies, the system can be discarded easily, and then re allocation of a new process to the logic of the operation.

·Making making making making from the security point of view, fastcgi and the host server is completely independent, fastcgi down won't server down,

·Making making making making from the performance point of view, fastcgi separate processing of dynamic logic from the server, IO processing load or to host server, such as IO host server can undivided attention, for a general dynamic Webpage, logic processing may be only a small part, a lot of pictures. Static IO do not need to complete the logic program participation (Note 1)

·Making making making making from the scalability of speaking, fastcgi is a neutral technology standard, can support any language processing program(php,java,python...)

2.apache

Apache is ranked first in the world for the web server NetCraft (www.netsraft.co.uk), according to the survey, more than fifty percent of the web server in the apache. world

1995Years4Month, The earliestapache(0.6.2Version)Byapache groupA release. apache group Is a completely throughinternetNon profit organization operation, Which determines theapache webThe server's standard release should include what content. Permission to modify the hidden fault, To provide new features and transplant it to a new platform., And other work. When the new code was submitted to theapache groupWhen the, The group audit its concrete content, Test, If that is satisfactory, The code will be integrated into theapacheThe main distribution.

The characteristics of Apache:

1) Runs on almost all the computer platform.

2) Support for the latest http/1.1 protocol

3) The configuration file is based on a simple but powerful(httpd.conf).

4) Support common gateway interface(cgi)

5) To support the virtual host.

6) Support for HTTP authentication.

7) Integrated perl.

8) The integration of the proxy server

9) May through the web browser to monitor the state of the server, you can customize the log.

10) Support server contains the command(ssi).

11) Support the safety of socket layer(ssl).

12) Has the user session tracking ability.

13) Support fastcgi

14) Support for Java servlets

3.nginx

Nginx is the Russians prepared very lightweight HTTP server, Nginx, it is pronounced "engine X", is a high performance HTTP and reverse proxy server, as well as a IMAP/POP3/SMTP proxy server.Nginx is Igor Sysoev by the Russians to Russia to visit the Rambler.ru site development capacity of second.

Write a Nginx in an event driven manner, so there is a very good performance, but also a very efficient reverse proxy, load balancing. It has to match the performance of Lighttpd, and no leakage of Lighttpd memory, and the Lighttpd mod_proxy also has some problems and long time no update. But Nginx does not support CGI mode, the reason is can reduce some program brings the loopholes. So you must use the FastCGI method to execute the PHP program.

Nginx as the HTTP server, the following basic characteristics:

Handling of static files, index files and the automatic indexing; open file descriptor buffer.

The reverse proxy without caching of acceleration, 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 filter. If the FastCGI or other proxy server processing in single page in a SSI, then this process can run in parallel, without the need to wait for each other.

Nginx is designed for performance optimization and development, performance is the most important consideration, implementation is very efficient. It supports the kernel Poll model, can endure high load test, there are reports that can support up to 50000 concurrent connections.

Nginx has a high stability. Other HTTP server, when the peak have access, or malicious initiated a slow connection, may also cause the server to physical memory exhausted frequent exchange, loss of response, can restart the server. For example, the current Apache once up to more than 200 processes, the response speed of the web is obviously very slowly. While Nginx has adopted a resource allocation phase, the CPU and memory occupancy rate is very low. Nginx officials said 10000 no active connections, it accounts for only 2.5M of memory, so like DOS attack is basically useless for nginx. Regarding stability, nginx better than lighthttpd.

Nginx support hot deployment. It is particularly easy to start, and almost can do 7*24 uninterrupted operation, even run a few months do not need to restart. You can also in uninterrupted services, for the software version upgrade.

Two.3Kind ofWEBThe comparison of the server:

server

Apache

Nginx     

Lighttpd

The Proxy agent

Very nice

Very nice

The general

Rewriter

Good

Very nice

The general

Fcgi

Not good

Good

Very nice

Hot deployment

Does not support

Support

Does not support

Pressure system

Great

Too small

Relatively small

Stability

Good

Very nice

Not good

Safety

Good

The general

The general

Technical support

Very nice

Very seldom

The general

Static file processing

The general

Very nice

Good

Vhosts virtual host

Support

Does not support

Support

Reverse proxy

The general

Very nice

The general

Session sticky

Support

Does not support

Does not support


Note: in a relatively large site, saves the server cost is the objective. While some small sites often server is not much, if the Apache of this kind of traditional Web server, seem to also can hold the past. But it has obvious drawbacks: Apache when dealing with traffic bursts (such as crawler or a Digg effect) is easy to overload, in this case the Nginx is most appropriate.

Proposal:

The Apache server (mainly deal with the PHP and some functions such as Chinese request: URL)

Nginx front-end server (using it occupies less system resources advantage to deal with static page requests)

Lighttpd image server

Overall, with the function of nginx to improve will make him become the future mainstream web server.

Three.Performance test:

Will test 3 kinds of software on the response time of dynamic pages and static page requests and concurrency when

l        Static page Sohu Home Page

LIGHTTPD

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

100000/100

64

60

462.75

21.6

100000/200

67

60

312.07

32.4

100000/500

83

60

137.24

72.8

100000/1000

An error packet loss

94

60

126.6

78.9


NGINX

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

100000/100

34.6

140

943.66

10.597

100000/200

35.6

110

924.32

10.818

100000/500

34.3

110

912.68

10.956

100000/1000

37

160

832.59

12.106


APACHE

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

100000/100

40.6

170

690.72

14.47

100000/200

41.1

180

685.39

14.59

100000/500

42.3

190

633.64

15.78

100000/1000

43.1

200

547.53

18.26


l        Dynamic pages within the community.

LIGHTTPD

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

1000/100

50

200

33.54

29.816

1000/200

52

210

30.43

32.858

1000/500

54

230

25.79

38.76

1000/1000

62

250

24.83

40.28


NGINX

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

1000/100

53.8

250

83.12

12.305

1000/200

55.8

250

74.05

13.504

1000/500

56

260

58.99

16.951

1000/1000

58

260

43.41

23.347


APACHE

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

100000/100

60

200

27.37

36.541

100000/200

61

220

23.82

41.981

100000/500

73

150

20.59

48.562

100000/1000

53

200

27.18

36.796


l        PHPINFOFunction.

LIGHTTPD

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

100000/100

45

20

168.06

59.504

100000/200

47

22

140.64

71.103

100000/500

49

24

52.80

189.386

100000/1000

Test program to die in the request to the 4840


NGINX

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

100000/100

70

120

143.46

69.706

100000/200

72

130

140.57

71.140

100000/500

73

150

135.87

73.601

100000/1000

77

160

132.18

75.657


APACHE packet loss

n/-c (AB parameter)

cpu%

Mem

RequestsperSecond

Time taken for tests

100000/100

70

180

245.73

40.694

100000/200

72

190

245.79

40.684

100000/500

75

200

241.29

41.443

100000/1000

77

220

236.74

42.239


Each big website four.WEBThe list of server resources

The site name making operating system making web server

1.Portal website:

Sohu making making LINUX making making making making Apache 1.3.37

Sina making making LINUX making making making making Apache 2.0.54

Thunder making making LINUX making making making making nginx 0.6.31

163      LINUX           apache 2.2.6

2.Search

Baidu making making unknown making making making BWS 1

Google   linux           gws

Sougou   FreeBSD         apache 2.2.4

Hao123   linux          apache 2.2.4

4. Electronic mailbox category

126        linux         apache

Hotmail    win2003      microsoft-IIS 6.0

Sina mailbox making F5 Big-IP making Apache 2.2.8

263        linux         apache 2.2.6

5. The blog

Sina blog making Linux making making making making nginx 0.5.35

Sohu blog making Linux making making making making nginx

Thunder blog making Linux making making making making nginx 0.6.32

The blog making F5 Big-IP making making Microsoft-IIS/5.0

6.Video class

Youku making making making making Linux making making making making Apache

Potatoes making making making making Linux making making making making Apache

Ku6         linux           apache

Six rooms making making making Linux making making making making nginx 0.6.14

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Drew at January 12, 2014 - 7:54 PM