You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "fairyqb (via GitHub)" <gi...@apache.org> on 2026/01/20 06:48:24 UTC
[I] bug: bug,Why does the overall average response time for long connections (keep-alive) exceed that for short connections (close) in performance tests? [apisix]
fairyqb opened a new issue, #12927:
URL: https://github.com/apache/apisix/issues/12927
### Current Behavior
### Is there an existing issue for this?
- [x] I have searched the existing issues
### 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:
<img width="1315" height="554" alt="Image" src="https://github.com/user-attachments/assets/1a8513cb-c9a2-4504-aadf-0cfc55572373" />
iftop:
<img width="992" height="89" alt="Image" src="https://github.com/user-attachments/assets/63da7d78-b70f-4dc5-a4d3-526ec18107b1" />
### 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)
2. 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](https://github.com/user-attachments/files/24729236/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 #1 SMP Wed Feb 23 16:47:03 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: bug,Why does the overall average response time for long connections (keep-alive) exceed that for short connections (close) in performance tests? [apisix]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #12927:
URL: https://github.com/apache/apisix/issues/12927#issuecomment-4002731247
If there is still a problem, please open it again.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: bug,Why does the overall average response time for long connections (keep-alive) exceed that for short connections (close) in performance tests? [apisix]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop commented on issue #12927:
URL: https://github.com/apache/apisix/issues/12927#issuecomment-3869543959
Hi @fairyqb, can you use Nginx for testing? This will help quickly pinpoint the layer where the issue occurs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: bug,Why does the overall average response time for long connections (keep-alive) exceed that for short connections (close) in performance tests? [apisix]
Posted by "Baoyuantop (via GitHub)" <gi...@apache.org>.
Baoyuantop closed issue #12927: bug: bug,Why does the overall average response time for long connections (keep-alive) exceed that for short connections (close) in performance tests?
URL: https://github.com/apache/apisix/issues/12927
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org