Dubbo --- Registration Center

1, Multicast registry

    1.1  Multicast registry    does not need to start any central node , as long as the broadcast address, you can find each other.

    1.2 

                

    1.3 Configuration

       

 

2, ZooKeeper registry (the official recommended)

    1.1   Zookeeper is Apacahe Hadoop subprojects, is a tree of directory services , support change push for Dubbo services as registration centers, industrial high strength, can be used in a production environment , and is recommended  .

    1.2

          1.2.1   Dubbo support zkclient and curator two kinds Zookeeper client  achieve

                Note: zkclient has been removed to achieve the 2.7.x version, if you want to use zkclient client, we need to expand on their own;

          1.2.2 increase of the provider and consumer    zookeeper client jar package dependency:      

<dependency>
    <groupId>org.apache.zookeeper</groupId>
    <artifactId>zookeeper</artifactId>
    <version>3.3.3</version>
</dependency>

          1.2.3  使用zkclient 客户端

                  从 2.2.0 版本开始缺省为 zkclient 实现,以提升 zookeeper 客户端的健状性。zkclient 是 Datameer 开源的一个 Zookeeper 客户端实现;

                  

          1.2.4  使用 curator 客户端

                  从 2.3.0 版本开始支持可选 curator 实现。Curator 是 Netflix 开源的一个 Zookeeper 客户端实现。

                  

          1.2.5  Zookeeper 单机配置

                

          1.2.6  Zookeeper 集群配置

                

<dubbo:registry address="zookeeper://10.20.153.10:2181?backup=10.20.153.11:2181,10.20.153.12:2181" />

  或

<dubbo:registry protocol="zookeeper" address="10.20.153.10:2181,10.20.153.11:2181,10.20.153.12:2181" />

          1.2.7  同一 Zookeeper,分成多组注册中心 

              

<dubbo:registry id="chinaRegistry" protocol="zookeeper" address="10.20.153.10:2181" group="china" />
<dubbo:registry id="intlRegistry" protocol="zookeeper" address="10.20.153.10:2181" group="intl" />

  

 

3、Nacos 注册中心

4、Redis 注册中心

5、Simple 注册中心

 

Guess you like

Origin www.cnblogs.com/anpeiyong/p/10991330.html