backnero opened a new issue #2828:
URL: https://github.com/apache/apisix/issues/2828
### Issue description
When two routes of the same upstream-service are requested, the first route
responds successfully, and the second route shows path loss, or the response
value is the same as the first route. After a period of time, about 1-2
minutes, the access to the second one will respond normally, but the same
problem occurs when accessing the first one. The current phenomenon has found
that in the same upstream service, the routes of multiple upstream services are
accessed in a short time. The problem did not occur.
yaml configuration example, confidential information has been hidden
```
routes:
- id: 30101
priority: 0
methods:
- GET
- POST
- PUT
- DELETE
- OPTIONS
uris:
- /doc/auth/*
hosts:
- t.com
service_id: 20001
name: 获取文档
plugins:
proxy-rewrite:
uri: /v1/doc
scheme: http
- id: 30305
priority: 0
methods:
- GET
- OPTIONS
uris:
- /account/rsa
hosts:
- t.com
service_id: 20003
name: 获取RSA密钥
plugins:
proxy-rewrite:
uri: /v1/account/rsa
scheme: http
- id: 30301
priority: 0
methods:
- OPTIONS
- POST
uris:
- /account/captcha
hosts:
- t.com
service_id: 20003
name: 生成验证码
plugins:
proxy-rewrite:
uri: /v1/account/captcha
scheme: http
services:
# auth
- id: 20001
name: "auth-services"
desc: "auth service"
upstream_id: 10001
plugins:
cors:
allow_origins: "*"
expose_headers: "*"
max_age: 5
allow_headers: "*"
allow_methods: "*"
- id: 20003
name: "account-services"
desc: "account service"
upstream_id: 10002
plugins:
cors:
allow_origins: "*"
expose_headers: "*"
max_age: 5
allow_headers: "*"
allow_methods: "*"
upstreams:
- id: 10001
name: "auth-upstreams"
desc: "auth service"
enable_websocket: false
nodes:
"auth.default.svc.cluster.local:8080": 1
hash_on: vars
type: roundrobin
- id: 10002
name: "account-upstreams"
desc: "account service"
enable_websocket: false
nodes:
"account.default.svc.cluster.local:8080": 1
hash_on: vars
type: roundrobin
global_rules:
- plugins:
limit-count:
time_window: 60
key: http_x_real_ip
count: 1000
rejected_code: 503
policy: local
response-rewrite:
headers:
Server: T Gateway
request-id:
include_in_response: true
header_name: X-Request-Id
```
When I approached the 30301 and 30305 routes at the same time, 30301 would
return normally and the forwarded path would be normal. 30305 is a little
later, and sometimes it is incorrectly forwarded to the root path of the
upstream service, that is, the path is lost. Sometimes it will be the same as
the return value of 30301. While accessing 30301 and 30101 at the same time,
this problem will not occur. This kind of problem will last about 1 minute
after the first visit, I wonder if my description is clear
①
First visit

Close to the same time

②
First visit

Close to the same time

When this problem occurs, I access an interface of another service, and the
service interface will return to normal, but the problem will occur again as
described above
### Environment
* apisix version (cmd: `apisix version`): v2.0 yaml
* OS:centos7
### Minimal test code / Steps to reproduce the issue
1.
2.
3.
### What's the actual result? (including assertion message & call stack if
applicable)
### What's the expected result?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]