在 2018年12月28日星期五 UTC+8下午3:34:11,fysun...@gmail.com写道:
When I use openresty as my proxy server, I test it . But the result is amazing.
They have the same backend. But I don't know why proxy_pass has bad result.
When use httpc libs ,the result is
Running 30s test @ http://localhost:8066/hello.txt
50 threads and 1000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 7.23ms 13.97ms 637.80ms 96.57%
Req/Sec 3.80k 608.84 28.28k 90.22%
Latency Distribution
50% 4.68ms
75% 7.20ms
90% 11.58ms
99% 67.99ms
5679648 requests in 30.10s, 1.08GB read
Socket errors: connect 0, read 0, write 69, timeout 0
Requests/sec: 188692.54
Transfer/sec: 36.88MB
But use proxy_pass, the result is very bad
Running 30s test @ http://localhost:8088/hello.txt
50 threads and 1000 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 52.47ms 10.42ms 861.49ms 84.97%
Req/Sec 378.57 64.21 6.32k 86.99%
Latency Distribution
50% 52.28ms
75% 57.32ms
90% 61.64ms
99% 69.29ms
565629 requests in 30.10s, 107.86MB read
Socket errors: connect 0, read 0, write 60, timeout 0
Requests/sec: 18792.65
Transfer/sec: 3.58MB