Current Behavior
Is there an existing issue for this?
aspsix version ($ aspsix version)
3.9.0
Current Behavior
Why does the overall average response time for long connections (keep-alive) exceed that for short connections (close) in performance tests? Why is this?
average response time:
14.01ms > 9.76ms (keepalive > close)
wrk:

iftop:

Expected Behavior
Long connections perform better than short connections.
Error Logs
no error
Steps to Reproduce
command:
1.post 500KB,connection:keepalive
wrk -t8 -c16 -d1m -s post.lua --latency --timeout 5s http://10.129.9.39:5074/user (apisix)
- post 500KB,connection:close
wrk -t8 -c16 -d1m -s post_close.lua --latency --timeout 5s http://10.129.9.39:5074/user (apisix)
client post 500KB, server returned the string "ok".
post.lua
wrk.method = "POST"
wrk.headers["Content-Type"] = "application/json"
wrk.headers["Connection"] = "keep-alive"
local file = io.open("/root/tls/500kb.json", "rb")
wrk.body = file:read("*all")
file:close()
post_close.lua
wrk.method = "POST"
wrk.headers["Content-Type"] = "application/json"
wrk.headers["Connection"] = "close"
local file = io.open("/root/tls/500kb.json", "rb")
wrk.body = file:read("*all")
file:close()
Anything else?
500kb-json.zip
Environment
- APISIX version (run
apisix version):3.9.0
- Operating system (run
uname -a): 3.10.0-1160.59.1.el7.x86_64 GNU/Linux
Current Behavior
Is there an existing issue for this?
aspsix version (
$ aspsix version)3.9.0
Current Behavior
Why does the overall average response time for long connections (keep-alive) exceed that for short connections (close) in performance tests? Why is this?
average response time:
14.01ms > 9.76ms (keepalive > close)
wrk:

iftop:

Expected Behavior
Long connections perform better than short connections.
Error Logs
no error
Steps to Reproduce
command:
1.post 500KB,connection:keepalive
wrk -t8 -c16 -d1m -s post.lua --latency --timeout 5s http://10.129.9.39:5074/user (apisix)
wrk -t8 -c16 -d1m -s post_close.lua --latency --timeout 5s http://10.129.9.39:5074/user (apisix)
client post 500KB, server returned the string "ok".
post.lua
post_close.lua
Anything else?
500kb-json.zip
Environment
apisix version):3.9.0uname -a): 3.10.0-1160.59.1.el7.x86_64 GNU/Linux