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

loadbalance 的filter功能不能生效。 #974

Open
taidixiong opened this issue Apr 14, 2021 · 6 comments
Open

loadbalance 的filter功能不能生效。 #974

taidixiong opened this issue Apr 14, 2021 · 6 comments

Comments

@taidixiong
Copy link

i.Filters = lbConfig.Filters

lbConfig.Filters的Filters没有被赋值。

GetServerListFilters看起来是一个分割filter的函数,代码内部是出于什么考虑没有使用了。

@tianxiaoliang
Copy link
Member

tianxiaoliang commented Apr 16, 2021

请描述下业务场景,我比较推荐使用route能力,不要依赖于filter,因为filter需要编码,route规则仅需要声明

参考 https://go-chassis.readthedocs.io/en/latest/user-guides/router.html

@taidixiong
Copy link
Author

我这边使用双机房部署,A1、B1都在1机房,A2、B2都在2机房。希望A1能优先调用B1。如果B1在1机房都不存在了则A1调用到B2。

@tianxiaoliang
Copy link
Member

我这边使用双机房部署,A1、B1都在1机房,A2、B2都在2机房。希望A1能优先调用B1。如果B1在1机房都不存在了则A1调用到B2。

ok,我会提供一个具体的example给你

@jindongxia
Copy link

i.Filters = lbConfig.Filters

lbConfig.Filters的Filters没有被赋值。

GetServerListFilters看起来是一个分割filter的函数,代码内部是出于什么考虑没有使用了。

请问你的配置文件是什么?特别是dc信息,多谢

@tianxiaoliang
Copy link
Member

请隐藏敏感信息提供

@tianxiaoliang
Copy link
Member

tianxiaoliang commented Jun 1, 2021

配置项重新设计

  • servicecomb.service.region.name: dc1
  • servicecomb.service.region.availableZone: az1
  • crossZoneLoadBalancing:true

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

3 participants