monkeyDluffy6017 opened a new issue, #9030: URL: https://github.com/apache/apisix/issues/9030
### Current Behavior 1. create an upstream ``` curl http://127.0.0.1:9180/apisix/admin/upstreams/1 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -i -X PUT -d ' { "type":"roundrobin", "nodes":[ { "host":"httpbin.org", "port":80, "weight":1 }, { "host":"ifconfig.io", "port":80, "weight":1 } ], "checks": { "active": { "timeout": 5, "http_path": "/status", "host": "foo.com", "healthy": { "interval": 2, "successes": 1 }, "unhealthy": { "interval": 1, "http_failures": 2 } } } }' ``` 2. create a route ``` curl http://127.0.0.1:9180/apisix/admin/routes/1 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { "uri": "/*", "upstream_id": 1 }' ``` 3. add a log  4. send requests We can see that a random IP is returned each time  5. it will create a new upstream every request  https://github.com/apache/apisix/blob/master/apisix/utils/upstream.lua#L98 6. it will create a health checker every request  ### Expected Behavior It should not create a health check every request ### Error Logs no ### Steps to Reproduce It is described above ### Environment - APISIX version (run `apisix version`): 3.1.0 - Operating system (run `uname -a`): ubuntu 22.04 - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 1.21.4.1 - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): - APISIX Dashboard version, if relevant: - Plugin runner version, for issues related to plugin runners: - LuaRocks version, for installation issues (run `luarocks --version`): -- 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]
