roundrobin 负载不均衡问题
同一台机器,不同provider dubbo服务端口方式测试
consume.xml, provider.xml 服务均配置 loadbalance="roundrobin", 使用zookeeper注册中心。
如果一上来就启动好2个provider, 再启动consumer,通过日志观察2个provider基本上是轮询负载的,但是如果先启动一个 provider + consumer 运行一段时间,在启动第二个provider,则发现2个provider之间的轮询负载很不均衡。
Hi, Can you provide sth showing how the load is not balanced?
是这样的,因为dubbo 有个 warmup 的过程, 新启动的 provider 权重比较低,所以会存在负载不均衡的情况。
我也遇到过一样的问题,但是启动一段时间后负载就均匀了
Actually, Dubbo takes 10 minutes during the warming of the provider, and during the warmup minutes, the load to this provider is inceasely up, so this appears some unbalances as you see. but after the warmup, it will be balanced.
BTW, if you have no special requirement, recommend you to use random strategy because of its simplicity and efficient compared to the RR‘s states calcuations.
this issue can be closed.
understand, tks for the reply~!