-
Notifications
You must be signed in to change notification settings - Fork 1
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
balancer: 平滑的加权轮询算法 #1
Comments
|
SubConnInfo 的抽象应该不对外暴露的吧 |
嗯,做成私有的更加好 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
仅限中文
使用场景
行业分析
WRR 应该算是非常常见的算法,但是在 grpc 的默认实现里面,这个算法的权重并不是服务端提供的,而是客户端自己计算的,不太适合一些基于权重的负载均衡的场景。
现在要求你提供一个基于平滑的加权轮询算法的负载均衡算法的实现。
可行方案
你需要考虑,对于不同的服务注册与发现的实现来说,权重可能放到了不同的地方。也就是你拿到了的 SubConnInfo 的时候,你需要设计一个抽象,允许通过不同的字段将权重读取出来。
其它
你使用的是 grpx 哪个版本?
你设置的的 Go 环境?
The text was updated successfully, but these errors were encountered: