Home  >  Q&A  >  body text

java - 面试题:Dubbo中zookeeper做注册中心,如果注册中心集群都挂掉,发布者和订阅者之间还能通信么?

如题:Dubbo中zookeeper做注册中心,如果注册中心集群都挂掉,发布者和订阅者之间还能通信么?

================================================================================
可以的,启动dubbo时,消费者会从zk拉取注册的生产者的地址接口等数据,缓存在本地。每次调用时,按照本地存储的地址进行调用

PHP中文网PHP中文网2740 days ago866

reply all(5)I'll reply

  • PHPz

    PHPz2017-04-18 09:47:10

    Yes, you can look at the documentation for explanations on this:

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 09:47:10

    Yes, the consumer has a list of producers locally, and he will continue to work according to the list. However, it is impossible to synchronize the latest service list from the registration center. It does not matter if the registration center hangs up in the short term, but it must be repaired as soon as possible

    reply
    0
  • 阿神

    阿神2017-04-18 09:47:10

    It doesn’t matter if it hangs up, but the premise is that you have not added new services. If you want to call new services, you cannot do it

    reply
    0
  • 高洛峰

    高洛峰2017-04-18 09:47:10

    Yes, when dubbo is started, the consumer will pull the registered producer's address interface and other data from zk and cache it locally. Each time it is called, it is called according to the locally stored address

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 09:47:10

    Yes, it is said in the document that the correspondence address will be cached

    reply
    0
  • Cancelreply