spring-cloud-tencent icon indicating copy to clipboard operation
spring-cloud-tencent copied to clipboard

北极星1.6.0-2020.0.5 版本负载均衡算法问题

Open WlisonChan opened this issue 3 years ago • 1 comments

What is the feature you want to add? 当前的北极星版本:1.6.0-2020.0.5,在服务主调其他服务接口失败后切换重试节点使用的是随机负载均衡的算法。

希望能支持以下功能:可以自定义实现类似负载均衡的算法,以及提供默认的轮询负载均衡算法、随机负载均衡算法。

Why do you want to add this feature? 北极星版本:1.6.0-2020.0.5 我在进行北极星和springcloud 2020版本测试(测试过程如下图):测试 主调失败重试 时有个疑问:主调方失败后重试的节点是随机取的,有可能取到同一个节点,这不太合理。因为有这么一个场景,我们k8s上的pod每次发布时都是滚动更新的,滚动更新期间有请求的流量打过来就会失败,此时不应该再在这个节点上进行重试,而是切换节点进行重试。

测试过程:

北极星注册的微服务如下,有4个节点: image

主调方LoadBalancer配置如下: image

调用失败重试结果: image 结果呈现是:在8085端口的服务请求失败后还是重试8085端口,以及后面8083端口也是同样的情况~

How to implement this feature?

Additional context Add any other context or screenshots about the feature request here.

WlisonChan avatar Aug 02 '22 08:08 WlisonChan

我们修复一下

lepdou avatar Aug 04 '22 02:08 lepdou

1.6.0-2020.0.5 是轮询算法,之前用的1.4.3-2020.0.5是随机,问题关闭~

WlisonChan avatar Aug 11 '22 12:08 WlisonChan