You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/10/25 07:14:24 UTC

[GitHub] [dubbo] FinalVersion commented on issue #8538: dubbo多注册中心的可用性问题

FinalVersion commented on issue #8538:
URL: https://github.com/apache/dubbo/issues/8538#issuecomment-950598826


   > 这个问题是 zk、nacos 客户端的差异,zk 如果链接不上客户端会抛出异常而 nacos 客户端则不会。也就是在下图 step 1 的位置,`check=false` 参数使用的地方在 step 2 的位置,所以如果 zk 链接不上,这个参数也没有生效。
   > 
   > ```
   >         // step 1 create client
   >         final Registry registry = getRegistry(originInvoker);
   >         final URL registeredProviderUrl = getUrlToRegistry(providerUrl, registryUrl);
   > 
   >         boolean register = providerUrl.getParameter(REGISTER_KEY, true);
   >         // step 2 register
   >         if (register) {
   >             registry.register(registeredProviderUrl);
   >         }
   > ```
   > 
   > 这个问题和多注册中心没有关系,关键在于 ` Registry registry = getRegistry(originInvoker);` 创建 zk 客户端异常就会退出并且`check=false` 参数也没有生效。
   
   我来补充一下这个issue的需求,
   1. MultipleRegistry组合的任意一个注册中心可用,就认为MultipleRegistry可用;MultipleRegistry组合的所有注册中心都不可用,就认为MultipleRegistry不可用。(保证MultipleRegistry可用性>=单一注册中心)
   2. MultipleRegistry除了必要的配置上的区别外,应尽量和单一注册中心使用方式保持一致。以check=true/false设置为例,在MultipleRegistry注册中心不可用(注册/订阅失败)的情况下,如果check=true,抛异常并启动失败,否则正常启动
   3. 在正常启动的情况下,底层注册中心由不可用恢复可用时,MultipleRegistry应补注册、发现
   
   综上,对MultipleRegistry组合的ZookeeperRegistry设置check=false其实并不满足需求


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org