You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2019/06/26 07:29:37 UTC
[GitHub] [incubator-brpc] zyearn commented on issue #820: LALB 策略可能落入死循环
zyearn commented on issue #820: LALB 策略可能落入死循环
URL: https://github.com/apache/incubator-brpc/issues/820#issuecomment-505755733
这个问题是在 https://github.com/apache/incubator-brpc/blob/master/src/brpc/policy/locality_aware_load_balancer.cpp#L460 这里对_base_weight赋值的时候赋成0了,导致在SelectServer时判断disable()为true就永远选不了了,最简单的解决办法是把 Disable() 和 Disabled()的实现改成 _base_weight = -1, 以及 _base_weight == -1就好了。
如果一个节点出问题了,那么在feedback的时候会减小它的权重,就算在随机值落在这个server上,在发rpc之前也会把InFlight rpc的惩罚加到权重上,如果随机值不落在这个新权重里,还是会重新选一次的,这里的逻辑看起来没问题,问题节点的流量会越来越小
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org