tzssangglass edited a comment on issue #5120:
URL: https://github.com/apache/apisix/issues/5120#issuecomment-925718061
My reproduction steps are as follows
1. branch: release/2.6
case 1.1:
route configuration:
```
{
"uris": [
"/zymk-getuserinfo-api/"
],
"plugins": {
"proxy-rewrite": {
"headers": {
"X-Api-Engine": "apisix",
"X-Api-Version": "v1"
},
"regex_uri": [
"^/zymk-getuserinfo-api/(.)",
"/$1$2$3"
]
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
}
}
```
benchmark:
```
wrk2 -t4 -c60 -d10s -R4000 --latency
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
Running 10s test @
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
4 threads and 60 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.20ms 755.26us 13.91ms 80.72%
Req/Sec nan nan 0.00 0.00%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 1.14ms
75.000% 1.56ms
90.000% 1.93ms
99.000% 2.75ms
99.900% 10.99ms
99.990% 13.77ms
99.999% 13.92ms
100.000% 13.92ms
```
case 1.2:
route configuration:
```
{
"uris": [
"/zymk-getuserinfo-api/"
],
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
}
}
```
benchmark:
```
wrk2 -t4 -c60 -d10s -R4000 --latency
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
Running 10s test @
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
4 threads and 60 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.22ms 563.10us 9.66ms 67.77%
Req/Sec nan nan 0.00 0.00%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 1.19ms
75.000% 1.59ms
90.000% 1.93ms
99.000% 2.62ms
99.900% 3.32ms
99.990% 8.47ms
99.999% 9.67ms
100.000% 9.67ms
```
2. branch: master
case 2.1:
route configuration:
```
{
"uris": [
"/zymk-getuserinfo-api/"
],
"plugins": {
"proxy-rewrite": {
"headers": {
"X-Api-Engine": "apisix",
"X-Api-Version": "v1"
},
"regex_uri": [
"^/zymk-getuserinfo-api/(.)",
"/$1$2$3"
]
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
}
}
```
benchmark:
```
wrk2 -t4 -c60 -d10s -R4000 --latency
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
Running 10s test @
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
4 threads and 60 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.21ms 663.60us 15.90ms 76.45%
Req/Sec nan nan 0.00 0.00%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 1.17ms
75.000% 1.56ms
90.000% 1.92ms
99.000% 2.65ms
99.900% 7.88ms
99.990% 15.33ms
99.999% 15.90ms
100.000% 15.90ms
```
case 2.2:
route configuration:
```
{
"uris": [
"/zymk-getuserinfo-api/"
],
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
}
}
```
benchmark:
```
wrk2 -t4 -c60 -d10s -R4000 --latency
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
Running 10s test @
http://127.0.0.1:9080/index.html/zymk-getuserinfo-api/
4 threads and 60 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.15ms 544.15us 3.64ms 66.16%
Req/Sec nan nan 0.00 0.00%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 1.14ms
75.000% 1.52ms
90.000% 1.86ms
99.000% 2.57ms
99.900% 3.08ms
99.990% 3.44ms
99.999% 3.64ms
100.000% 3.64ms
```
from case 1.1 and case 1.2, it is related to the regular configuration of
the proxy-rewrite plugin
from case 1.2 and case 2.2, it is related to apisix version
but this does not explain the 59 ms delay.
Things you need to be sure of.
1. whether `/zymk-getuserinfo-api/` is the only route that has this problem,
and if so, then it may be related to the upstream of this route.
2. remove the prometheus and proxy-rewrite plugins from the
`/zymk-getuserinfo-api/` route separately to determine if it is an APISIX 2.6
issue or a plugin issue.
possibly relate PR: https://github.com/apache/apisix/pull/4405/files
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]