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 2020/12/12 08:41:35 UTC

[GitHub] [incubator-brpc] seahime edited a comment on issue #986: 0.96 release WRR负载均衡分配的QPS不均匀

seahime edited a comment on issue #986:
URL: https://github.com/apache/incubator-brpc/issues/986#issuecomment-743724813


   > ## 每个地址可以附带一个tag,在常见的命名服务中,如果地址后有空格,则空格之后的内容均为tag。 相同的地址配合不同的tag被认为是不同的实例,brpc会建立不同的连接。用户可利用这个特性更灵活地控制与单个地址的连接方式。 如果你需要"带权重的轮询",你应当优先考虑使用wrr算法,而不是用tag来模拟。
   > 我理解你这个ip:port+空格 后面的这个数字,我理解应该是tag,而不是你理解的权重
   > 但是如何配置wrr,貌似文档中也没有给出来
   
   同意你的理解,我读文档时也是这样理解的。
   但是我刚刚使用 example/echo_c++ 中的代码做测试时(仅更改client.cpp中 init channele),发现实际是如下的情况:
   在形如 `ip:port tag` 的配置写法下,无论是 list 还是 file naming service,tag 都被 wrr 算法当成权重处理了。
   
   附实验:
   三个 server 进程,端口和tag分别为:
   > 8001 2
   > 8002 3
   > 8003 5
   
   client echo 100 次 ,结果三个 servers 承担的请求数量分别为 20、30、50
   


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org