dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

roundrobin 负载不均衡问题

Open shenfx opened this issue 8 years ago • 5 comments

同一台机器,不同provider dubbo服务端口方式测试

consume.xml, provider.xml 服务均配置 loadbalance="roundrobin", 使用zookeeper注册中心。

如果一上来就启动好2个provider, 再启动consumer,通过日志观察2个provider基本上是轮询负载的,但是如果先启动一个 provider + consumer 运行一段时间,在启动第二个provider,则发现2个provider之间的轮询负载很不均衡。

shenfx avatar Sep 01 '18 08:09 shenfx

Hi, Can you provide sth showing how the load is not balanced?

carryxyh avatar Sep 01 '18 09:09 carryxyh

是这样的,因为dubbo 有个 warmup 的过程, 新启动的 provider 权重比较低,所以会存在负载不均衡的情况。

LiZhenNet avatar Sep 03 '18 10:09 LiZhenNet

我也遇到过一样的问题,但是启动一段时间后负载就均匀了

rebornsteven avatar Sep 08 '18 06:09 rebornsteven

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.

Jeff-Lv avatar Sep 14 '18 01:09 Jeff-Lv

understand, tks for the reply~!

shenfx avatar Sep 14 '18 01:09 shenfx