关闭keep-alive
2025年3月14日大约 5 分钟hyperlanewebrustspeedclosekeep-alive
wrk
压测命令
wrk -c360 -d60s -H "Connection: close" http://127.0.0.1:60000/
压测结果
提示
测试 360
并发,持续 60s
请求。QPS
结果如下:
- 1
Hyperlane框架
:51031.27 - 2
Tokio
:49555.87 - 3
Rocket框架
:49345.76 - 4
Gin框架
:40149.75 - 5
Go标准库
:38364.06 - 6
Rust标准库
:30142.55 - 7
Node标准库
:28286.96
hyperlane 框架
Running 1m test @ http://127.0.0.1:60000/
2 threads and 360 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.51ms 2.12ms 254.29ms 74.68%
Req/Sec 25.69k 1.78k 42.56k 74.94%
3066756 requests in 1.00m, 298.32MB read
Requests/sec: 51031.27
Transfer/sec: 4.96MB
Rust 标准库
Running 1m test @ http://127.0.0.1:60000/
2 threads and 360 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 13.39ms 39.09ms 938.33ms 93.24%
Req/Sec 15.17k 1.25k 19.88k 71.08%
1811006 requests in 1.00m, 151.99MB read
Requests/sec: 30142.55
Transfer/sec: 2.53MB
Tokio 框架
Running 1m test @ http://127.0.0.1:60000/
2 threads and 360 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.64ms 2.97ms 331.60ms 89.67%
Req/Sec 24.93k 2.37k 31.57k 64.49%
2976845 requests in 1.00m, 249.83MB read
Requests/sec: 49555.87
Transfer/sec: 4.16MB
Rocket 框架
Running 1m test @ http://127.0.0.1:60000/
2 threads and 360 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 3.70ms 3.23ms 246.75ms 92.68%
Req/Sec 24.83k 2.31k 47.87k 71.72%
2963056 requests in 1.00m, 729.05MB read
Requests/sec: 49345.76
Transfer/sec: 12.14MB
Gin 框架
Running 1m test @ http://127.0.0.1:60000/
2 threads and 360 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.69ms 2.66ms 37.49ms 68.89%
Req/Sec 20.22k 3.79k 28.13k 59.02%
2412349 requests in 1.00m, 322.08MB read
Requests/sec: 40149.75
Transfer/sec: 5.36MB
Go 标准库
Running 1m test @ http://127.0.0.1:60000/
2 threads and 360 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.96ms 3.17ms 248.63ms 75.61%
Req/Sec 19.33k 4.01k 28.20k 59.12%
2303964 requests in 1.00m, 307.61MB read
Requests/sec: 38364.06
Transfer/sec: 5.12MB
Node 标准库
Running 1m test @ http://127.0.0.1:60000/
2 threads and 360 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.76ms 3.48ms 55.44ms 68.85%
Req/Sec 14.22k 2.88k 28.04k 83.54%
1699058 requests in 1.00m, 233.33MB read
Socket errors: connect 337, read 0, write 0, timeout 0
Requests/sec: 28286.96
Transfer/sec: 3.88MB
ab
压测命令
ab -n 1000000 -c 1000 -r http://127.0.0.1:60000/
压测结果
提示
测试 1000
并发,一共 100w
请求。QPS
结果如下:
- 1
Tokio
:51825.13 - 2
Hyperlane框架
:51554.47 - 3
Rocket框架
:49621.02 - 4
Go标准库
:47915.20 - 5
Gin框架
:47081.05 - 6
Node标准库
:44763.11 - 7
Rust标准库
:31511.00
hyperlane 框架
Server Hostname: 127.0.0.1
Server Port: 60000
Document Path: /
Document Length: 5 bytes
Concurrency Level: 1000
Time taken for tests: 19.397 seconds
Complete requests: 1000000
Failed requests: 0
Total transferred: 107000000 bytes
HTML transferred: 5000000 bytes
Requests per second: 51554.47 [#/sec] (mean)
Time per request: 19.397 [ms] (mean)
Time per request: 0.019 [ms] (mean, across all concurrent requests)
Transfer rate: 5387.04 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 9 9.1 8 1069
Processing: 0 10 4.7 10 289
Waiting: 0 9 4.5 9 286
Total: 1 19 11.1 19 1085
Percentage of the requests served within a certain time (ms)
50% 19
66% 22
75% 24
80% 25
90% 29
95% 33
98% 37
99% 41
100% 1085 (longest request)
Rust 标准库
Server Hostname: 127.0.0.1
Server Port: 60000
Document Path: /
Document Length: 5 bytes
Concurrency Level: 1000
Time taken for tests: 31.735 seconds
Complete requests: 1000000
Failed requests: 0
Total transferred: 88000000 bytes
HTML transferred: 5000000 bytes
Requests per second: 31511.00 [#/sec] (mean)
Time per request: 31.735 [ms] (mean)
Time per request: 0.032 [ms] (mean, across all concurrent requests)
Transfer rate: 2707.98 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 22 167.7 0 7232
Processing: 0 9 45.2 4 5771
Waiting: 0 9 45.2 4 5771
Total: 0 31 178.6 4 7441
Percentage of the requests served within a certain time (ms)
50% 4
66% 5
75% 5
80% 6
90% 7
95% 8
98% 426
99% 1050
100% 7441 (longest request)
Tokio 框架
Server Hostname: 127.0.0.1
Server Port: 60000
Document Path: /
Document Length: 5 bytes
Concurrency Level: 1000
Time taken for tests: 19.296 seconds
Complete requests: 1000000
Failed requests: 0
Total transferred: 88000000 bytes
HTML transferred: 5000000 bytes
Requests per second: 51825.13 [#/sec] (mean)
Time per request: 19.296 [ms] (mean)
Time per request: 0.019 [ms] (mean, across all concurrent requests)
Transfer rate: 4453.72 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 9 19.4 8 1091
Processing: 0 10 5.4 9 284
Waiting: 0 9 5.2 8 284
Total: 0 19 20.6 18 1107
Percentage of the requests served within a certain time (ms)
50% 18
66% 21
75% 23
80% 25
90% 29
95% 33
98% 38
99% 42
100% 1107 (longest request)
Rocket 框架
Server Software: Rocket
Server Hostname: 127.0.0.1
Server Port: 60000
Document Path: /
Document Length: 13 bytes
Concurrency Level: 1000
Time taken for tests: 20.153 seconds
Complete requests: 1000000
Failed requests: 0
Total transferred: 247000000 bytes
HTML transferred: 13000000 bytes
Requests per second: 49621.02 [#/sec] (mean)
Time per request: 20.153 [ms] (mean)
Time per request: 0.020 [ms] (mean, across all concurrent requests)
Transfer rate: 11969.13 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 9 11.2 9 1094
Processing: 0 11 5.4 10 305
Waiting: 0 10 5.2 9 305
Total: 0 20 13.3 19 1107
Percentage of the requests served within a certain time (ms)
50% 19
66% 22
75% 25
80% 26
90% 30
95% 34
98% 39
99% 43
100% 1107 (longest request)
Gin 框架
Server Hostname: 127.0.0.1
Server Port: 60000
Document Path: /
Document Length: 5 bytes
Concurrency Level: 1000
Time taken for tests: 21.240 seconds
Complete requests: 1000000
Failed requests: 0
Total transferred: 140000000 bytes
HTML transferred: 5000000 bytes
Requests per second: 47081.05 [#/sec] (mean)
Time per request: 21.240 [ms] (mean)
Time per request: 0.021 [ms] (mean, across all concurrent requests)
Transfer rate: 6436.86 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 10 13.0 9 1095
Processing: 0 12 6.0 11 288
Waiting: 0 11 5.8 10 286
Total: 1 21 15.1 20 1114
Percentage of the requests served within a certain time (ms)
50% 20
66% 23
75% 26
80% 27
90% 32
95% 35
98% 40
99% 44
100% 1114 (longest request)
Go 标准库
Server Hostname: 127.0.0.1
Server Port: 60000
Document Path: /
Document Length: 13 bytes
Concurrency Level: 1000
Time taken for tests: 20.870 seconds
Complete requests: 1000000
Failed requests: 0
Total transferred: 149000000 bytes
HTML transferred: 13000000 bytes
Requests per second: 47915.20 [#/sec] (mean)
Time per request: 20.870 [ms] (mean)
Time per request: 0.021 [ms] (mean, across all concurrent requests)
Transfer rate: 6972.04 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 9 21.1 8 1103
Processing: 0 11 6.5 11 323
Waiting: 0 10 6.3 10 322
Total: 1 21 22.6 19 1120
Percentage of the requests served within a certain time (ms)
50% 19
66% 23
75% 25
80% 27
90% 31
95% 35
98% 41
99% 46
100% 1120 (longest request)
Node 标准库
Server Hostname: 127.0.0.1
Server Port: 60000
Document Path: /
Document Length: 13 bytes
Concurrency Level: 1000
Time taken for tests: 22.340 seconds
Complete requests: 1000000
Failed requests: 0
Total transferred: 114000000 bytes
HTML transferred: 13000000 bytes
Requests per second: 44763.11 [#/sec] (mean)
Time per request: 22.340 [ms] (mean)
Time per request: 0.022 [ms] (mean, across all concurrent requests)
Transfer rate: 4983.39 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 6 42.1 4 1086
Processing: 0 16 11.7 15 453
Waiting: 0 13 11.2 12 452
Total: 1 22 43.7 20 1108
Percentage of the requests served within a certain time (ms)
50% 20
66% 22
75% 23
80% 24
90% 27
95% 29
98% 33
99% 37
100% 1108 (longest request)