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

client 访问config server负载均衡算法 #3225

Closed
jiangpeng811 opened this issue Aug 5, 2020 · 5 comments · Fixed by #4394
Closed

client 访问config server负载均衡算法 #3225

jiangpeng811 opened this issue Aug 5, 2020 · 5 comments · Fixed by #4394
Labels
area/client apollo-client discussion Categorizes issue as related to discussion feature request Categorizes issue as related to a new feature.

Comments

@jiangpeng811
Copy link

if (lastServiceDto == null) {
List configServices = getConfigServices();
lastServiceDto = configServices.get(random.nextInt(configServices.size()));
}

是否有改造计划,使用更丰富的负载均衡算法。

@nobodyiam
Copy link
Member

有实际的场景吗?

@zouyx
Copy link
Member

zouyx commented Aug 8, 2020

https://github.com/zouyx/agollo/blob/0e7984a49229d8bdb69693f91571dd453d955741/cluster/load_balance.go#L29

我认为可以参照 go client 负载均衡可以抽象,Apollo 提供默认实现,用户自行扩展。😁

@nobodyiam nobodyiam added the discussion Categorizes issue as related to discussion label Aug 8, 2020
@jiangpeng811
Copy link
Author

  1. 场景会有很多,轮询机制,跟据权重随机,最小活跃数等
  2. zouyx 的建议任务可行,建议框架把负载均衡接口抽象出来,做成SPI, Apollo 提供默认实现,用户自行扩展。

@zouyx
Copy link
Member

zouyx commented Aug 12, 2020

  1. 场景会有很多,轮询机制,跟据权重随机,最小活跃数等
  2. zouyx 的建议任务可行,建议框架把负载均衡接口抽象出来,做成SPI, Apollo 提供默认实现,用户自行扩展。

如果 @nobodyiam 觉得可以,我来搞下。

@nobodyiam
Copy link
Member

@zouyx 可以尝试一下😀

@Anilople Anilople added area/client apollo-client feature request Categorizes issue as related to a new feature. labels Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/client apollo-client discussion Categorizes issue as related to discussion feature request Categorizes issue as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants