apisix
                                
                                 apisix copied to clipboard
                                
                                    apisix copied to clipboard
                            
                            
                            
                        help request: When there are two routes with the same rules in apisix, will apisix perform load balancing?
Description
1.路由1 { "uri": "/test-boot/", "name": "AutoRouterUpstream_TEST-BOOT", "desc": "", "hosts": [ "apisix-gateway-ew.apisix.svc.cluster.local" ], "plugins": { "proxy-rewrite": { "regex_uri": [ "^/test-boot/(.)", "/${1}" ] } }, "upstream": { "type": "roundrobin", "hash_on": "vars", "scheme": "http", "discovery_type": "eureka", "pass_host": "pass", "service_name": "TEST-BOOT" }, "labels": { "prefix": "AutoRouterUpstream_" }, "status": 1 } 2.路由2 { "uri": "/test-boot/", "name": "AutoRouterUpstream_TEST-BOOT", "desc": "", "hosts": [ "apisix-gateway-ew.apisix.svc.cluster.local" ], "plugins": { "proxy-rewrite": { "regex_uri": [ "^/test-boot/(.)", "/${1}" ] } }, "upstream": { "type": "roundrobin", "hash_on": "vars", "scheme": "http", "discovery_type": "eureka", "pass_host": "pass", "service_name": "TEST-BOOT" }, "labels": { "prefix": "AutoRouterUpstream_" }, "status": 1 }
3.上面两个路由仅仅只是Route ID不一样。我们的集群中,早上访问对应路由的时候,apisix选择的是路由1;下午apisix给切换 成路由2了。请问是否有相关负载均衡呢?里面对于相同路由的选择是怎样的算法呢
Environment
- APISIX version (run apisix version):
- Operating system (run uname -a):
- OpenResty / Nginx version (run openresty -Vornginx -V):
- 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):
Hitting two routes is random if the conditions for participating in the match are identical for both routes. You should avoid this situation.
Hitting two routes is random if the conditions for participating in the match are identical for both routes. You should avoid this situation.
It's not random, all requests will be either hit the first one or the second one.
It's not random, all requests will be either hit the first one or the second one.
I know what you mean about hitting one of them when there is no rebuilt route. In a broad time dimension, they are random.
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.