Nginx vs Apache

I recently added nginx as front end for apache. Now nginx serve static content, PHP requests are peroxided to Apache.

Nginx frontend, Apache backend

[root@server12 ~]# ab -n 1000 -c 100 http://netfree.netfreehost.com/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking netfree.netfreehost.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:        nginx/1.1.0
Server Hostname:        netfree.netfreehost.com
Server Port:            80

Document Path:          /
Document Length:        16844 bytes

Concurrency Level:      100
Time taken for tests:   5.463353 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      17357000 bytes
HTML transferred:       16844000 bytes
Requests per second:    183.04 [#/sec] (mean)
Time per request:       546.335 [ms] (mean)
Time per request:       5.463 [ms] (mean, across all concurrent requests)
Transfer rate:          3102.49 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.8      0       5
Processing:    44  518  93.9    534     719
Waiting:       44  517  94.0    533     718
Total:         47  518  93.2    534     719

Percentage of the requests served within a certain time (ms)
  50%    534
  66%    553
  75%    566
  80%    574
  90%    592
  95%    606
  98%    642
  99%    665
 100%    719 (longest request)
[root@server12 ~]#

Apache Only

[root@server12 ~]# ab -n 1000 -c 100 http://netfree.netfreehost.com:81/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking netfree.netfreehost.com (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:        Apache/2.2.3
Server Hostname:        netfree.netfreehost.com
Server Port:            81

Document Path:          /
Document Length:        16844 bytes

Concurrency Level:      100
Time taken for tests:   7.102347 seconds
Complete requests:      1000
Failed requests:        1
   (Connect: 0, Length: 1, Exceptions: 0)
Write errors:           0
Total transferred:      17351384 bytes
HTML transferred:       16827683 bytes
Requests per second:    140.80 [#/sec] (mean)
Time per request:       710.235 [ms] (mean)
Time per request:       7.102 [ms] (mean, across all concurrent requests)
Transfer rate:          2385.69 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.1      0       6
Processing:    34  676 174.9    669    1261
Waiting:       32  675 175.0    668    1260
Total:         34  676 174.4    669    1261

Percentage of the requests served within a certain time (ms)
  50%    669
  66%    696
  75%    732
  80%    754
  90%    893
  95%    974
  98%   1081
  99%   1128
 100%   1261 (longest request)
[root@server12 ~]#

See Apache, Nginx

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *