您的位置:首页 > 运维架构 > Nginx

基于Keepalived+Varnish+Nginx实现的高可用LAMP架构

2018-09-22 08:03 946 查看
[root@client Desktop]# for i in {1..20}; do curl http://192.168.4.120; done
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
<h1>10.10.0.21 server</h1>
<h1>10.10.0.22 server</h1>
[root@client Desktop]# ab -c 100 -n 10000 http://192.168.4.120/wordpress  #对动态页面进行压测
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.4.120 (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Completed 10000 requests
Finished 10000 requests

Server Software:        nginx/1.12.2
Server Hostname:        192.168.4.120
Server Port:            80

Document Path:          /wordpress
Document Length:        239 bytes

Concurrency Level:      100
Time taken for tests:  4.685 seconds
Complete requests:      10000
Failed requests:        0
Write errors:          0
Non-2xx responses:      10000
Total transferred:      4600000 bytes
HTML transferred:      2390000 bytes
Requests per second:    2134.44 [#/sec] (mean)
Time per request:      46.851 [ms] (mean)
Time per request:      0.469 [ms] (mean, across all concurrent requests)
Transfer rate:          958.83 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median  max
Connect:        0    1  4.8      0      51
Processing:    10  45  7.4    46      67
Waiting:        1  44  7.8    46      67
Total:        12  47  6.5    46      89

Percentage of the requests served within a certain time (ms)
  50%    46
  66%    47
  75%    48
  80%    49
  90%    53
  95%    58
  98%    63
  99%    67
 100%    89 (longest request)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: