Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

路由规则权重weight=100的疑问 #1348

Open
xushaomin opened this issue Jul 18, 2024 · 4 comments
Open

路由规则权重weight=100的疑问 #1348

xushaomin opened this issue Jul 18, 2024 · 4 comments

Comments

@xushaomin
Copy link

image
调用下游服务时,规则匹配到,当weight=100时,下游无version=0.0.2的服务节点,应该是返回空,而不是返回其他节点

@chengyouling
Copy link
Collaborator

目前的逻辑是如果当前路由获取的实例为空时:
1、权重设置等于100,那么返回所有实例;
2、权重小于100时,返回其他未设置tag实例;

@xushaomin
Copy link
Author

目前的逻辑是如果当前路由获取的实例为空时:
1、权重设置等于100,那么返回所有实例;
2、权重小于100时,返回其他未设置tag实例;

权重设置等于100,下游没有实例,返回空,个人觉得这样才更合理些

@chengyouling
Copy link
Collaborator

很多时候灰度只是控制流量的执行方向,但是还是要优先保证请求的正常执行,您可以简单描述下灰度实例不存在返回空实例的场景,我们看看在灰度返回实例的地方加开关控制

@chengyouling
Copy link
Collaborator

chengyouling commented Aug 1, 2024

spring-cloud-huawei 1.11.9-2021.0.x 支持emptyProtection开关设置,控制返回空实例或者全部实例

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants