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

使用标签后 就不是负载均衡了 #4

Open
xjr100419 opened this issue Dec 29, 2017 · 2 comments
Open

使用标签后 就不是负载均衡了 #4

xjr100419 opened this issue Dec 29, 2017 · 2 comments

Comments

@xjr100419
Copy link

for (Server server : serverList)
循环遍历后 就直接返回匹配的 server。 如果有多个匹配 就不可以了

@wzlovegit
Copy link

在 IRule 中做过滤,其实是重写了 Rule 的规则,如果想集成 Ribbon 提供的 Rule 功能,我认为可以在通过标签筛选出 server 后,继续使用 Ribbon 的 Rule 功能。

@wzlovegit
Copy link

ServerListFilter 周期性执行过滤 server 。 LoadBalance 每次请求的时候都会获取 ServerListFilter 获得到的 server 的信息,经过 Rule 再选择。 所以要想继续使用 Ribbon 提供的 Rule 可以扩展 LoadBalance 完成 server 的选择,在经过 Rule 选择指定的 server

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