nginx + tomcat 集群测试

运行环境| centos 7.0 | VMware Workstation 15 Pro | tomcat 8.5 | nginx 1.14.2

Tomcat集群 + Nginx负载均衡测试

测试命令:

ab -n20000 -c1000 http://192.168.244.10/drp/index.jsp

Nginx + Tomcat集群测试结果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Server Software:        nginx/1.14.2
Server Hostname: 192.168.244.10
Server Port: 80

Document Path: /drp/index.jsp
Document Length: 216 bytes

Concurrency Level: 1000
Time taken for tests: 9.126 seconds
Complete requests: 20000
Failed requests: 488
(Connect: 0, Receive: 0, Length: 488, Exceptions: 0)
Write errors: 0
Non-2xx responses: 488
Total transferred: 8973152 bytes
HTML transferred: 4308776 bytes
Requests per second: 2191.63 [#/sec] (mean)
Time per request: 456.282 [ms] (mean)
Time per request: 0.456 [ms] (mean, across all concurrent requests)
Transfer rate: 960.24 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 226 628.0 0 7000
Processing: 0 146 325.0 51 7122
Waiting: 0 146 325.0 51 7122
Total: 1 372 757.6 60 8422

Percentage of the requests served within a certain time (ms)
50% 60
66% 147
75% 260
80% 385
90% 1070
95% 1831
98% 3062
99% 3230
100% 8422 (longest request)

Tomcat 集群测试结果

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Server Software:        
Server Hostname: 192.168.244.11
Server Port: 8080

Document Path: /drp/index.jsp
Document Length: 216 bytes

Concurrency Level: 1000
Time taken for tests: 5.161 seconds
Complete requests: 20000
Failed requests: 0
Write errors: 0
Total transferred: 8733153 bytes
HTML transferred: 4397112 bytes
Requests per second: 3875.41 [#/sec] (mean)
Time per request: 258.037 [ms] (mean)
Time per request: 0.258 [ms] (mean, across all concurrent requests)
Transfer rate: 1652.56 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 153 282.6 70 1125
Processing: 17 96 51.3 85 2010
Waiting: 0 74 44.9 69 2004
Total: 28 250 294.5 167 2025

Percentage of the requests served within a certain time (ms)
50% 167
66% 186
75% 198
80% 210
90% 293
95% 1185
98% 1219
99% 1232
100% 2025 (longest request)
本文结束感谢您的阅读,本文原创–支持原创
顺便打点赏吧~ 有问题请联系我--strivedeer@163.com