zrlw edited a comment on issue #9623: URL: https://github.com/apache/dubbo/issues/9623#issuecomment-1021353016
我推测dubbo搞推空保护机制是因为nacos集群扩缩容(增加节点、停止节点)都会出现实例数量抖动甚至直接降为0的问题。 所以nacos搞了个推空保护机制来缓解这个问题,而zk就没有这个东西,看到nacos这样做,dubbo也跟着搞了个推空保护。 我个人觉得本质问题是nacos注册中心代码处理逻辑不完善,比如这两个issue: https://github.com/alibaba/nacos/issues/7697 https://github.com/alibaba/nacos/issues/7687 针对上述问题我们定制了一版nacos,启动、停止nacos服务节点时,其余nacos节点的naming-event日志不会发生变动,换句话说启停节点时,其他节点的注册实例数量将会保持不变,此外新启动的节点完成Distro初始化后(就是从其他一个节点成功拉取全部实例的快照),之后再等待一个心跳超时才参与节点之间的实例同步以及客户端的订阅服务列表推送,确保新启动节点在收全自己负责的实例心跳之后,再推送给客户端、或者同步给nacos集群中的其他节点,防止推送内容不完整。 这方面的修改内容在上面两个issue里对应的PR里有。 -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
