This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch refactor/next-2
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git


The following commit(s) were added to refs/heads/refactor/next-2 by this push:
     new c713378868 Update apollo & nacos & zookeeper
c713378868 is described below

commit c713378868ac923677921c30be45d1a9f8b7887b
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Feb 10 14:07:16 2023 +0800

    Update apollo & nacos & zookeeper
---
 .../what/ecosystem/config-center/apollo.md         | 110 ++++++++++++-
 .../overview/what/ecosystem/config-center/nacos.md |  52 +++++-
 .../what/ecosystem/config-center/zookeeper.md      | 104 +++++++++++-
 .../what/ecosystem/metadata-center/nacos.md        | 111 ++++++++++++-
 .../what/ecosystem/metadata-center/zookeeper.md    | 104 +++++++++++-
 .../overview/what/ecosystem/registry/nacos.md      | 177 ++++++++++++++++++++-
 .../overview/what/ecosystem/registry/zookeeper.md  | 124 ++++++++++++++-
 7 files changed, 775 insertions(+), 7 deletions(-)

diff --git a/content/zh-cn/overview/what/ecosystem/config-center/apollo.md 
b/content/zh-cn/overview/what/ecosystem/config-center/apollo.md
index 7fba329bd0..d39d3d17e6 100644
--- a/content/zh-cn/overview/what/ecosystem/config-center/apollo.md
+++ b/content/zh-cn/overview/what/ecosystem/config-center/apollo.md
@@ -4,4 +4,112 @@ title: "Apollo"
 linkTitle: "Apollo"
 weight: 30
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Apollo(阿波罗)是一款可靠的分布式配置管理中心,诞生于携程框架研发部,能够集中化管理应用不同环境、不同集群的配置,配置修改后能够实时推送到应用端,并且具备规范的权限、流程治理等特性,适用于微服务配置管理场景。
+
+
+## 2 使用说明
+在此查看[完整示例代码](https://github.com/apache/dubbo-samples/tree/master/3-extensions/configcenter/dubbo-samples-configcenter-apollo)
+
+### 2.1 增加 Maven 依赖
+
+```xml
+<dependency>
+    <groupId>org.apache.dubbo</groupId>
+    <artifactId>dubbo</artifactId>
+    <version>3.0.9</version>
+</dependency>
+<dependency>
+    <groupId>com.ctrip.framework.apollo</groupId>
+    <artifactId>apollo-openapi</artifactId>
+    <version>2.0.0</version>
+</dependency>
+<dependency>
+    <groupId>com.ctrip.framework.apollo</groupId>
+    <artifactId>apollo-client</artifactId>
+    <version>2.0.0</version>
+</dependency>
+```
+
+### 2.2 启用 Apollo 配置中心
+```xml
+<dubbo:config-center address="apollo://localhost:8080"/>
+```
+
+或者
+
+```yaml
+dubbo
+  config-center
+    address: apollo://localhost:8080
+```
+
+或者
+
+```properties
+dubbo.config-center.address=apollo://localhost:8080
+```
+
+或者
+
+```java
+ConfigCenterConfig configCenter = new ConfigCenterConfig();
+configCenter.setAddress("apollo://localhost:8080");
+```
+
+## 3 高级配置
+Apollo中的一个核心概念是命名空间 - namespace,和上面 Zookeeper、Nacos 的 namespace 
概念不同,因此使用方式上也比较特殊些,建议充分了解 Apollo 自身的用法后再阅读以下文档内容。
+
+但总的来说,对 Apollo 的适配而言:
+* namespace 特用于流量治理规则隔离,参见 3.1
+* group 特用于外部化配置的隔离,参见 3.2
+
+### 3.1 外部化配置
+
+```xml
+<dubbo:config-center group="demo-provider" address="apollo://localhost:8080"/>
+```
+
+config-center 的 `group` 决定了 Apollo 读取外部化配置 `dubbo.properties` 文件的位置:
+1. 如果 group 为空,则默认从 `dubbo` namespace 读取配置,用户须将外部化配置写在 `dubbo` namespace 下。
+2. 如果 group 不为空
+   2.1 group 值为应用名,则从应用当前的 namespace 读取配置,用户须将外部化配置写在 Apollo 自动指定的应用默认 
namespace 下。
+   2.2 group 值为任意值,则从对应的 namespace 读取配置,用户须将外部化配置写在该 namespace 下。
+
+如以下示例是用的默认 group='dubbo' 的全局外部化配置,即该配置可被所有应用读取到。
+![apollo-configcenter-dubbo.png](/imgs/user/apollo-configcenter-dubbo.png)
+
+如果配置 group='应用名' 则是应用特有配置,只有该应用可以读取到。
+
+> 关于外部化文件配置托管,相当于是把 `dubbo.properties` 配置文件的内容存储在了 Apollo 中。每个应用都可以通过关联共享的 
`dubbo` namespace 继承公共配置, 进而可以单独覆盖个别配置项。
+### 3.2 流量治理规则
+**流量治理规则一定都是全局共享的,因此每个应用内的 namespace 配置都应该保持一致。**
+
+```xml
+<dubbo:config-center namespace="governance" address="apollo://localhost:8080"/>
+```
+
+config-center 的 `namespace` 决定了 Apollo 存取 `流量治理规则` 的位置:
+1. 如果 namespace 为空,则默认从 `dubbo` namespace 存取配置,须治理规则写在 `dubbo` namespace 下。
+2. 如果 namespace 不为空,则从对应的 namespace 值读取规则,须治理规则写在该 namespace 下。
+
+如以下示例是通过 `namespace='governance'` 将流量治理规则放在了 `governance` namespace 下。
+![apollo-configcenter-governance-dubbo.png](/imgs/user/apollo-configcenter-governance-dubbo.png)
+
+### 3.3 更多 Apollo 特有配置
+当前 Dubbo 适配了 env、apollo.meta、apollo.cluster、apollo.id 等特有配置项,可通过 config-center 
的扩展参数进行配置。
+
+如
+```properties
+dubbo.config-center.address=apollo://localhost:8080
+```
+
+或者
+
+```properties
+dubbo.config-center.prameters.apollo.meta=xxx
+dubbo.config-center.prameters.env=xxx
+```
diff --git a/content/zh-cn/overview/what/ecosystem/config-center/nacos.md 
b/content/zh-cn/overview/what/ecosystem/config-center/nacos.md
index b143dedff1..4dfeebfc4e 100644
--- a/content/zh-cn/overview/what/ecosystem/config-center/nacos.md
+++ b/content/zh-cn/overview/what/ecosystem/config-center/nacos.md
@@ -4,4 +4,54 @@ title: "Nacos"
 linkTitle: "Nacos"
 weight: 20
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 
的首字母简称,一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
+
+Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据及流量管理。
+
+Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。 Nacos 是构建以“服务”为中心的现代应用架构 (例如微服务范式、云原生范式) 
的服务基础设施。
+
+参考文档:https://nacos.io/zh-cn/docs/v2/what-is-nacos.html
+
+
+## 2 使用说明 - Java
+Dubbo 融合 Nacos 成为元数据中心的操作步骤非常简单,大致分为 `增加 Maven 依赖` 以及 `配置元数据中心` 两步。
+> 如果元数据地址(dubbo.metadata-report.address)也不进行配置,会使用注册中心的地址来用作元数据中心。
+
+### 2.1 增加 Maven 依赖
+
+如果项目已经启用 Nacos 作为注册中心,则无需增加任何额外配置。
+
+如果未启用 Nacos 注册中心,则请参考 [为注册中心增加 Nacos 依赖](../../registry/nacos/#21-增加依赖)。
+> 当Dubbo使用`3.0.0`及以上版本时,需要使用Nacos `2.0.0`及以上版本
+
+### 2.2 启用 Nacos 配置中心
+```xml
+<dubbo:config-center address="nacos://127.0.0.1:8848"/>
+```
+
+或者
+
+```yaml
+dubbo:
+  config-center:
+    address: nacos://127.0.0.1:8848
+```
+
+或者
+
+```properties
+dubbo.config-center.address=nacos://127.0.0.1:8848
+```
+
+或者
+
+```java
+ConfigCenterConfig configCenterConfig = new ConfigCenterConfig();
+configCenterConfig.setAddress("nacos://127.0.0.1:8848");
+```
+
+`address` 格式请参考 [Nacos 注册中心 - 启用配置](../../registry/nacos/#22-配置并启用-nacos)
diff --git a/content/zh-cn/overview/what/ecosystem/config-center/zookeeper.md 
b/content/zh-cn/overview/what/ecosystem/config-center/zookeeper.md
index 7e3f0fcccf..bb7830c00c 100644
--- a/content/zh-cn/overview/what/ecosystem/config-center/zookeeper.md
+++ b/content/zh-cn/overview/what/ecosystem/config-center/zookeeper.md
@@ -4,4 +4,106 @@ title: "Zookeeper"
 linkTitle: "Zookeeper"
 weight: 10
 description: ""
----
\ No newline at end of file
+---
+
+
+## 1 介绍
+
+Apache ZooKeeper是Apache软件基金会的一个软件项目,它为大型分布式计算提供开源的分布式配置服务、同步服务和命名注册。 
ZooKeeper曾经是Hadoop的一个子项目,但现在是一个独立的顶级项目。
+
+ZooKeeper的架构通过冗余服务实现高可用性。因此,如果第一次无应答,客户端就可以询问另一台ZooKeeper主机。ZooKeeper节点将它们的数据存储于一个分层的名字空间,非常类似于一个文件系统或一个前缀树结构。客户端可以在节点读写,从而以这种方式拥有一个共享的配置服务。更新是全序的。
+
+
+## 2 使用说明 - Java
+
+在此查看[完整示例代码](https://github.com/apache/dubbo-samples/tree/master/3-extensions/registry/dubbo-samples-zookeeper)
+
+### 2.1 增加 Maven 依赖
+```xml
+<properties>
+    <dubbo.version>3.1.6</dubbo.version>
+</properties>
+
+<dependencies>
+    <!-- This dependency helps to introduce Curator and Zookeeper dependencies 
that are necessary for Dubbo to work with zookeeper as transitive dependencies  
-->
+    <dependency>
+        <groupId>org.apache.dubbo</groupId>
+        <artifactId>dubbo-dependencies-zookeeper</artifactId>
+        <version>${dubbo.version}</version>
+        <type>pom</type>
+    </dependency>
+</dependencies>
+```
+
+`dubbo-dependencies-zookeeper` 将自动为应用增加 Zookeeper 相关客户端的依赖,减少用户使用 Zookeeper 
成本,如使用中遇到版本兼容问题,用户也可以不使用 `dubbo-dependencies-zookeeper`,而是自行添加 
Curator、Zookeeper Client 等依赖。
+
+由于 Dubbo 使用 Curator 作为与 Zookeeper Server 交互的编程客户端,因此,要特别注意 Zookeeper Server 与 
Dubbo 版本依赖的兼容性
+
+|Zookeeper Server 版本|Dubbo 版本|Dubbo Zookeeper 依赖包|说明|
+|-----|-----|-----|-----|
+|3.4.x 及以下|3.0.x 及以上|dubbo-dependencies-zookeeper|传递依赖 Curator 4.x 、Zookeeper 
3.4.x|
+|3.5.x 及以上|3.0.x 及以上|dubbo-dependencies-zookeeper-curator5|传递依赖 Curator 5.x 
、Zookeeper 3.7.x|
+|3.4.x 及以上|2.7.x 及以下|dubbo-dependencies-zookeeper|传递依赖 Curator 4.x 、Zookeeper 
3.4.x|
+|3.5.x 及以上|2.7.x 及以下|无|须自行添加 Curator、Zookeeper 等相关客户端依赖|
+
+### 2.2 配置并启用 Zookeeper
+```yaml
+# application.yml
+dubbo:
+ config-center:
+   address: zookeeper://localhost:2181
+```
+或
+```properties
+# dubbo.properties
+dubbo.config-center.address=zookeeper://localhost:2181
+```
+或
+```xml
+<dubbo:config-center address="zookeeper://localhost:2181" />
+```
+
+`address` 是启用 zookeeper 注册中心唯一必须指定的属性,而在生产环境下,`address` 通常被指定为集群地址,如
+
+`address=zookeeper://10.20.153.10:2181?backup=10.20.153.11:2181,10.20.153.12:2181`
+
+protocol 与 address 分开配置的模式也可以,如
+
+`<dubbo:config-center protocol="zookeeper" 
address="10.20.153.10:2181,10.20.153.11:2181,10.20.153.12:2181" />`
+
+## 3 高级配置
+### 3.1 认证与鉴权
+
+如果 Zookeeper 开启认证,Dubbo 支持指定 username、password 的方式传入身份标识。
+
+```yaml
+# application.yml
+dubbo:
+  config-center:
+   address: zookeeper://localhost:2181
+   username: hello
+   password: 1234
+```
+
+也可以直接将参数扩展在 address 上 `address=zookeeper://hello:1234@localhost:2181`
+
+### 3.2 分组隔离
+通过指定 `group` 属性,可以在同一个 Zookeeper 
集群内实现微服务地址的逻辑隔离。比如可以在一套集群内隔离出多套开发环境,在地址发现层面实现隔离。
+
+```yaml
+# application.yml
+dubbo:
+  config-center:
+   address: zookeeper://localhost:2181
+   group: daily1
+```
+### 3.3 其他扩展配置
+配置连接、会话过期时间
+```yaml
+# application.yml
+dubbo:
+  config-center:
+   address: zookeeper://localhost:2181
+   timeout: 30 * 1000 # 连接超时时间,默认 30s
+   session: 60 * 1000 # 会话超时时间,默认 60s
+```
diff --git a/content/zh-cn/overview/what/ecosystem/metadata-center/nacos.md 
b/content/zh-cn/overview/what/ecosystem/metadata-center/nacos.md
index b143dedff1..1672a0b7d6 100644
--- a/content/zh-cn/overview/what/ecosystem/metadata-center/nacos.md
+++ b/content/zh-cn/overview/what/ecosystem/metadata-center/nacos.md
@@ -4,4 +4,113 @@ title: "Nacos"
 linkTitle: "Nacos"
 weight: 20
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 
的首字母简称,一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
+
+Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据及流量管理。
+
+Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。 Nacos 是构建以“服务”为中心的现代应用架构 (例如微服务范式、云原生范式) 
的服务基础设施。
+
+参考文档:https://nacos.io/zh-cn/docs/v2/what-is-nacos.html
+
+## 2 使用说明 - Java
+Dubbo 融合 Nacos 成为元数据中心的操作步骤非常简单,大致分为 `增加 Maven 依赖` 以及 `配置元数据中心` 两步。
+> 如果元数据地址(dubbo.metadata-report.address)也不进行配置,会使用注册中心的地址来用作元数据中心。
+
+### 2.1 增加 Maven 依赖
+
+如果项目已经启用 Nacos 作为注册中心,则无需增加任何额外配置。
+
+如果未启用 Nacos 注册中心,则请参考 [为注册中心增加 Nacos 依赖](../../registry/nacos/#21-增加依赖)。
+> 当Dubbo使用`3.0.0`及以上版本时,需要使用Nacos `2.0.0`及以上版本
+
+### 2.2 启用 Nacos 配置中心
+```xml
+<dubbo:metadata-report address="nacos://127.0.0.1:8848"/>
+```
+
+或者
+
+```yaml
+dubbo:
+  metadata-report:
+    address: nacos://127.0.0.1:8848
+```
+
+或者
+
+```properties
+dubbo.metadata-report.address=nacos://127.0.0.1:8848
+```
+
+或者
+
+```java
+MetadataReportConfig metadataConfig = new MetadataReportConfig();
+metadataConfig.setAddress("nacos://127.0.0.1:8848");
+```
+
+`address` 格式请参考 [Nacos 注册中心 - 启用配置](../../registry/nacos/#22-配置并启用-nacos)
+
+## 3 工作原理
+
+### 3.1 服务运维元数据
+
+在 Nacos 的控制台上可看到服务提供者、消费者注册的服务运维相关的元数据信息:
+
+![image-dubbo-metadata-nacos-1.png](/imgs/blog/dubbo-metadata-nacos-1.png)
+
+在 Nacos 中,本身就存在配置中心这个概念,正好用于元数据存储。在配置中心的场景下,存在命名空间- namespace 的概念,在 namespace 
之下,还存在 group 概念。即通过 namespace 和 group 以及 dataId 去定位一个配置项,在不指定 namespace 
的情况下,默认使用 ```public``` 作为默认的命名空间。
+
+```properties
+Provider: namespace: 'public', dataId: '{service 
name}:{version}:{group}:provider:{application name}', group: 'dubbo'
+Consumer: namespace: 'public', dataId: '{service 
name}:{version}:{group}:consumer:{application name}', group: 'dubbo'
+```
+当 version 或者 group 不存在时`:` 依然保留:
+```properties
+Provider: namespace: 'public', dataId: '{service name}:::provider:{application 
name}', group: 'dubbo'
+Consumer: namespace: 'public', dataId: '{service name}:::consumer:{application 
name}', group: 'dubbo'
+```
+
+Providers接口元数据详情 (通过 `report-definition=true` 控制此部分数据是否需要上报):
+
+![image-dubbo-metadata-nacos-3.png](/imgs/blog/dubbo-metadata-nacos-3.png)
+
+Consumers接口元信息详情(通过 `report-consumer-definition=true` 控制是否上报,默认 false):
+
+![image-dubbo-metadata-nacos-4.png](/imgs/blog/dubbo-metadata-nacos-4.png)
+
+### 3.2 地址发现 - 接口-应用映射
+在上面提到,service name 和 application name 可能是一对多的,在 nacos 中,使用单个 key-value 进行保存,多个 
application name 通过英文逗号`,`隔开。由于是单个 key-value 
去保存数据,在多客户端的情况下可能会存在并发覆盖的问题。因此,我们使用 nacos 中 publishConfigCas 的能力去解决该问题。在 nacos 
中,使用 publishConfigCas 会让用户传递一个参数 casMd5,该值的含义是之前配置内容的 md5 值。不同客户端在更新之前,先去查一次 
nacos 的 content 的值,计算出 md5 值,当作本地凭证。在更新时,把凭证 md5 传到服务端比对 md5 值, 
如果不一致说明在次期间被其他客户端修改过,重新获取凭证再进行重试(CAS)。目前如果重试6次都失败的话,放弃本次更新映射行为。
+
+Nacos api:
+```java
+ConfigService configService = ...
+configService.publishConfigCas(key, group, content, ticket);
+```
+
+映射信息位于 namespace: 'public', dataId: '{service name}', group: 'mapping'.
+
+![nacos-metadata-report-service-name-mapping.png](/imgs/user/nacos-metadata-report-service-name-mapping.png)
+
+### 3.3 地址发现 - 接口配置元数据
+
+要开启远程接口配置元数据注册,需在应用中增加以下配置,因为默认情况下 Dubbo3 应用级服务发现会启用服务自省模式,并不会注册数据到元数据中心。
+
+```properties
+ dubbo.application.metadata-type=remote
+ ```
+
+或者,在自省模式模式下仍开启中心化元数据注册
+
+```properties
+dubbo.application.metadata-type=local
+dubbo.metadata-report.report-metadata=true
+```
+
+Nacos server 中的元数据信息详情如下:
+
+![image-dubbo-metadata-nacos-2.png](/imgs/blog/dubbo-metadata-nacos-2.png)
diff --git a/content/zh-cn/overview/what/ecosystem/metadata-center/zookeeper.md 
b/content/zh-cn/overview/what/ecosystem/metadata-center/zookeeper.md
index 7e3f0fcccf..370d49a6ff 100644
--- a/content/zh-cn/overview/what/ecosystem/metadata-center/zookeeper.md
+++ b/content/zh-cn/overview/what/ecosystem/metadata-center/zookeeper.md
@@ -4,4 +4,106 @@ title: "Zookeeper"
 linkTitle: "Zookeeper"
 weight: 10
 description: ""
----
\ No newline at end of file
+---
+
+
+## 1 介绍
+
+Apache ZooKeeper是Apache软件基金会的一个软件项目,它为大型分布式计算提供开源的分布式配置服务、同步服务和命名注册。 
ZooKeeper曾经是Hadoop的一个子项目,但现在是一个独立的顶级项目。
+
+ZooKeeper的架构通过冗余服务实现高可用性。因此,如果第一次无应答,客户端就可以询问另一台ZooKeeper主机。ZooKeeper节点将它们的数据存储于一个分层的名字空间,非常类似于一个文件系统或一个前缀树结构。客户端可以在节点读写,从而以这种方式拥有一个共享的配置服务。更新是全序的。
+
+
+## 2 使用说明 - Java
+
+在此查看[完整示例代码](https://github.com/apache/dubbo-samples/tree/master/3-extensions/registry/dubbo-samples-zookeeper)
+
+### 2.1 增加 Maven 依赖
+```xml
+<properties>
+    <dubbo.version>3.1.6</dubbo.version>
+</properties>
+
+<dependencies>
+    <!-- This dependency helps to introduce Curator and Zookeeper dependencies 
that are necessary for Dubbo to work with zookeeper as transitive dependencies  
-->
+    <dependency>
+        <groupId>org.apache.dubbo</groupId>
+        <artifactId>dubbo-dependencies-zookeeper</artifactId>
+        <version>${dubbo.version}</version>
+        <type>pom</type>
+    </dependency>
+</dependencies>
+```
+
+`dubbo-dependencies-zookeeper` 将自动为应用增加 Zookeeper 相关客户端的依赖,减少用户使用 Zookeeper 
成本,如使用中遇到版本兼容问题,用户也可以不使用 `dubbo-dependencies-zookeeper`,而是自行添加 
Curator、Zookeeper Client 等依赖。
+
+由于 Dubbo 使用 Curator 作为与 Zookeeper Server 交互的编程客户端,因此,要特别注意 Zookeeper Server 与 
Dubbo 版本依赖的兼容性
+
+|Zookeeper Server 版本|Dubbo 版本|Dubbo Zookeeper 依赖包|说明|
+|-----|-----|-----|-----|
+|3.4.x 及以下|3.0.x 及以上|dubbo-dependencies-zookeeper|传递依赖 Curator 4.x 、Zookeeper 
3.4.x|
+|3.5.x 及以上|3.0.x 及以上|dubbo-dependencies-zookeeper-curator5|传递依赖 Curator 5.x 
、Zookeeper 3.7.x|
+|3.4.x 及以上|2.7.x 及以下|dubbo-dependencies-zookeeper|传递依赖 Curator 4.x 、Zookeeper 
3.4.x|
+|3.5.x 及以上|2.7.x 及以下|无|须自行添加 Curator、Zookeeper 等相关客户端依赖|
+
+### 2.2 配置并启用 Zookeeper
+```yaml
+# application.yml
+dubbo:
+ metadata-report:
+   address: zookeeper://localhost:2181
+```
+或
+```properties
+# dubbo.properties
+dubbo.metadata-report.address=zookeeper://localhost:2181
+```
+或
+```xml
+<dubbo:metadata-report address="zookeeper://localhost:2181" />
+```
+
+`address` 是启用 zookeeper 注册中心唯一必须指定的属性,而在生产环境下,`address` 通常被指定为集群地址,如
+
+`address=zookeeper://10.20.153.10:2181?backup=10.20.153.11:2181,10.20.153.12:2181`
+
+protocol 与 address 分开配置的模式也可以,如
+
+`<dubbo:metadata-report protocol="zookeeper" 
address="10.20.153.10:2181,10.20.153.11:2181,10.20.153.12:2181" />`
+
+## 3 高级配置
+### 3.1 认证与鉴权
+
+如果 Zookeeper 开启认证,Dubbo 支持指定 username、password 的方式传入身份标识。
+
+```yaml
+# application.yml
+dubbo:
+  metadata-report:
+   address: zookeeper://localhost:2181
+   username: hello
+   password: 1234
+```
+
+也可以直接将参数扩展在 address 上 `address=zookeeper://hello:1234@localhost:2181`
+
+### 3.2 分组隔离
+通过指定 `group` 属性,可以在同一个 Zookeeper 
集群内实现微服务地址的逻辑隔离。比如可以在一套集群内隔离出多套开发环境,在地址发现层面实现隔离。
+
+```yaml
+# application.yml
+dubbo:
+  metadata-report:
+   address: zookeeper://localhost:2181
+   group: daily1
+```
+### 3.3 其他扩展配置
+配置连接、会话过期时间
+```yaml
+# application.yml
+dubbo:
+  metadata-report:
+   address: zookeeper://localhost:2181
+   timeout: 30 * 1000 # 连接超时时间,默认 30s
+   session: 60 * 1000 # 会话超时时间,默认 60s
+```
diff --git a/content/zh-cn/overview/what/ecosystem/registry/nacos.md 
b/content/zh-cn/overview/what/ecosystem/registry/nacos.md
index b143dedff1..1c2cd82952 100644
--- a/content/zh-cn/overview/what/ecosystem/registry/nacos.md
+++ b/content/zh-cn/overview/what/ecosystem/registry/nacos.md
@@ -4,4 +4,179 @@ title: "Nacos"
 linkTitle: "Nacos"
 weight: 20
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 
的首字母简称,一个更易于构建云原生应用的动态服务发现、配置管理和服务管理平台。
+
+Nacos 致力于帮助您发现、配置和管理微服务。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据及流量管理。
+
+Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。 Nacos 是构建以“服务”为中心的现代应用架构 (例如微服务范式、云原生范式) 
的服务基础设施。
+
+参考文档:https://nacos.io/zh-cn/docs/v2/what-is-nacos.html
+
+
+## 2 使用说明 - Java
+在此查看[完整示例代码](https://github.com/apache/dubbo-samples/tree/master/3-extensions/registry/dubbo-samples-nacos/dubbo-samples-nacos-registry)
+
+### 2.1 增加依赖
+```xml
+<dependencies>
+    <dependency>
+      <groupId>com.alibaba.nacos</groupId>
+      <artifactId>nacos-client</artifactId>
+      <version>2.1.2</version>
+    </dependency>
+</dependencies>
+```
+增加 Dubbo 与 Nacos 依赖
+
+> Dubbo `3.0.0` 及以上版本需 nacos-client `2.0.0` 及以上版本
+
+### 2.2 配置并启用 Nacos
+
+```yaml
+# application.yml (Spring Boot)
+dubbo
+ registry
+   address: nacos://localhost:8848
+```
+或
+```properties
+# dubbo.properties
+dubbo.registry.address=nacos://localhost:8848
+```
+或
+```xml
+<dubbo:registry address="nacos://localhost:8848" />
+```
+
+启用应用,查看注册后的效果或工作原理,请查看 [工作原理](#4-工作原理)。
+
+## 3 高级配置
+
+### 3.1 认证
+
+```yaml
+# application.yml (Spring Boot)
+dubbo
+ registry
+   address: nacos://localhost:8848?username=nacos&password=nacos
+```
+
+或
+
+```properties
+# dubbo.properties
+dubbo.registry.address: nacos://nacos:nacos@localhost:8848
+```
+
+### 3.2 自定义命名空间
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ registry:
+   address: nacos://localhost:8848?namespace=5cbb70a5-xxx-xxx-xxx-d43479ae0932
+```
+
+或者
+
+```yaml
+# application.yml (Spring Boot)
+dubbo:
+ registry:
+   address: nacos://localhost:8848
+   parameters.namespace: 5cbb70a5-xxx-xxx-xxx-d43479ae0932
+```
+
+### 3.3 自定义分组
+
+```yaml
+# application.yml
+dubbo:
+ registry:
+   address: nacos://localhost:8848
+   group: dubbo
+```
+
+> 如果不配置的话,group 是由 Nacos 默认指定。group 和 namespace 在 Nacos 中代表不同的隔离层次,通常来说 
namespace 用来隔离不同的用户或环境,group 用来对同一环境内的数据做进一步归组。
+### 3.4 注册接口级消费者
+Dubbo3.0.0版本以后,增加了是否注册消费者的参数,如果需要将消费者注册到nacos注册中心上,需要将参数(register-consumer-url)设置为true,默认是false。
+```yaml
+# application.yml
+dubbo:
+  registry:
+    address: nacos://localhost:8848?register-consumer-url=true
+```
+或者
+```yaml
+# application.yml
+dubbo:
+  registry:
+    address: nacos://localhost:8848
+    parameters.register-consumer-url: true
+    
+```
+
+### 3.5 更多配置
+
+| 参数名                                   | 中文描述                                 
                                            | 默认值           |
+|---------------------------------------|----------------------------------------------------------------------------------|---------------|
+| username                              | 连接Nacos Server的用户名                   
                                            | nacos         |
+| paasword                              | 连接Nacos Server的密码                    
                                            | nacos         |
+| backup                                | 备用地址                                 
                                            | 空             |
+| namespace                             | 命名空间的ID                              
                                            | public        |
+| group                                 | 分组名称                                 
                                            | DEFAULT_GROUP |
+| register-consumer-url                 | 是否注册消费端                              
                                            | false         |
+| com.alibaba.nacos.naming.log.filename | 初始化日志文件名                             
                                            | naming.log    |
+| endpoint                              | 连接Nacos 
Server指定的连接点,可参考[文档](https://nacos.io/zh-cn/blog/address-server.html)    | 空    
         |
+| endpointPort                          | 连接Nacos 
Server指定的连接点端口,可以参考[文档](https://nacos.io/zh-cn/blog/address-server.html) | 空    
         |
+| endpointQueryParams                   | endpoint查参数询                         
                                            | 空             |
+| isUseCloudNamespaceParsing            | 是否解析云环境中的namespace参数                 
                                            | true          |
+| isUseEndpointParsingRule              | 是否开启endpoint 参数规则解析                  
                                            | true          |
+| namingLoadCacheAtStart                | 启动时是否优先读取本地缓存                        
                                            | true          |
+| namingCacheRegistryDir                | 指定缓存子目录,位置为 
.../nacos/{SUB_DIR}/naming                                           | 空        
     |
+| namingClientBeatThreadCount           | 客户端心跳的线程池大小                          
                                            | 机器的CPU数的一半    |
+| namingPollingThreadCount              | 客户端定时轮询数据更新的线程池大小                    
                                            | 机器的CPU数的一半    |
+| namingRequestDomainMaxRetryCount      | client通过HTTP向Nacos Server请求的重试次数     
                                            | 3             |
+| namingPushEmptyProtection             | 在服务没有有效(健康)实例时,是否开启保护,开启后则会使用旧的服务实例  
                                            | false         |
+| push.receiver.udp.port                | 客户端UDP的端口                            
                                            | 空             |
+
+在nacos-server@`1.0.0`版本后,支持客户端通过上报一些包含特定的元数据的实例到服务端来控制实例的一些行为。
+
+| 参数名                             | 中文描述                                 | 默认值 
   |
+|---------------------------------|--------------------------------------|--------|
+| preserved.heart.beat.timeout    | 该实例在不发送心跳后,从健康到不健康的时间(毫秒)            | 
15000  |
+| preserved.ip.delete.timeout     | 该实例在不发送心跳后,被服务端下掉该实例的时间(毫秒)          | 
30000  |
+| preserved.heart.beat.interval   | 该实例在客户端上报心跳的间隔时间(毫秒)                 | 
5000   |
+| preserved.instance.id.generator | 该实例的id生成策略,值为`snowflake`时,从0开始增加     | 
simple |
+| preserved.register.source       | 注册实例注册时服务框架类型(例如Dubbo,Spring Cloud等) | 空   
   |
+
+这些参数都可以类似 `namespace` 的方式通过通过参数扩展配置到 Nacos,如
+
+  ```properties
+  dubbo.registry.parameters.preserved.heart.beat.timeout=5000
+  ```
+
+## 4 工作原理
+
+以下仅为展示 Nacos 作为 Dubbo 注册中心的工作原理,Dubbo 服务运维建议使用 [Dubbo 
Admin](https://github.com/apache/dubbo-admin)
+
+### 4.1 Dubbo2 注册数据
+
+随后,重启您的 Dubbo 应用,Dubbo 的服务提供和消费信息在 Nacos 控制台中可以显示:
+
+![dubbo-registry-nacos-1.png](/imgs/blog/dubbo-registry-nacos-1.png)
+
+如图所示,服务名前缀为 `providers:` 的信息为服务提供者的元信息,`consumers:` 
则代表服务消费者的元信息。点击“**详情**”可查看服务状态详情:
+
+![image-dubbo-registry-nacos-2.png](/imgs/blog/dubbo-registry-nacos-2.png)
+
+### 4.2 Dubbo3 注册数据
+应用级服务发现的 "服务名" 为应用名
+
+
+
+> Dubbo3 默认采用 "应用级服务发现 + 接口级服务发现" 的双注册模式,因此会发现应用级服务(应用名)和接口级服务(接口名)同时出现在 Nacos 
控制台,可以通过配置 `dubbo.registry.register-mode=instance/interface/all` 来改变注册行为。
diff --git a/content/zh-cn/overview/what/ecosystem/registry/zookeeper.md 
b/content/zh-cn/overview/what/ecosystem/registry/zookeeper.md
index 7e3f0fcccf..36d8ff0321 100644
--- a/content/zh-cn/overview/what/ecosystem/registry/zookeeper.md
+++ b/content/zh-cn/overview/what/ecosystem/registry/zookeeper.md
@@ -4,4 +4,126 @@ title: "Zookeeper"
 linkTitle: "Zookeeper"
 weight: 10
 description: ""
----
\ No newline at end of file
+---
+
+## 1 介绍
+
+Apache ZooKeeper是Apache软件基金会的一个软件项目,它为大型分布式计算提供开源的分布式配置服务、同步服务和命名注册。 
ZooKeeper曾经是Hadoop的一个子项目,但现在是一个独立的顶级项目。
+
+ZooKeeper的架构通过冗余服务实现高可用性。因此,如果第一次无应答,客户端就可以询问另一台ZooKeeper主机。ZooKeeper节点将它们的数据存储于一个分层的名字空间,非常类似于一个文件系统或一个前缀树结构。客户端可以在节点读写,从而以这种方式拥有一个共享的配置服务。更新是全序的。
+
+
+## 2 使用说明 - Java
+
+在此查看[完整示例代码](https://github.com/apache/dubbo-samples/tree/master/3-extensions/registry/dubbo-samples-zookeeper)
+
+### 2.1 增加 Maven 依赖
+```xml
+<properties>
+    <dubbo.version>3.1.6</dubbo.version>
+</properties>
+
+<dependencies>
+    <!-- This dependency helps to introduce Curator and Zookeeper dependencies 
that are necessary for Dubbo to work with zookeeper as transitive dependencies  
-->
+    <dependency>
+        <groupId>org.apache.dubbo</groupId>
+        <artifactId>dubbo-dependencies-zookeeper</artifactId>
+        <version>${dubbo.version}</version>
+        <type>pom</type>
+    </dependency>
+</dependencies>
+```
+
+`dubbo-dependencies-zookeeper` 将自动为应用增加 Zookeeper 相关客户端的依赖,减少用户使用 Zookeeper 
成本,如使用中遇到版本兼容问题,用户也可以不使用 `dubbo-dependencies-zookeeper`,而是自行添加 
Curator、Zookeeper Client 等依赖。
+
+由于 Dubbo 使用 Curator 作为与 Zookeeper Server 交互的编程客户端,因此,要特别注意 Zookeeper Server 与 
Dubbo 版本依赖的兼容性
+
+|Zookeeper Server 版本|Dubbo 版本|Dubbo Zookeeper 依赖包|说明|
+|-----|-----|-----|-----|
+|3.4.x 及以下|3.0.x 及以上|dubbo-dependencies-zookeeper|传递依赖 Curator 4.x 、Zookeeper 
3.4.x|
+|3.5.x 及以上|3.0.x 及以上|dubbo-dependencies-zookeeper-curator5|传递依赖 Curator 5.x 
、Zookeeper 3.7.x|
+|3.4.x 及以上|2.7.x 及以下|dubbo-dependencies-zookeeper|传递依赖 Curator 4.x 、Zookeeper 
3.4.x|
+|3.5.x 及以上|2.7.x 及以下|无|须自行添加 Curator、Zookeeper 等相关客户端依赖|
+
+### 2.2 配置并启用 Zookeeper
+```yaml
+# application.yml
+dubbo:
+ registry:
+   address: zookeeper://localhost:2181
+```
+或
+```properties
+# dubbo.properties
+dubbo.registry.address=zookeeper://localhost:2181
+```
+或
+```xml
+<dubbo:registry address="zookeeper://localhost:2181" />
+```
+
+`address` 是启用 zookeeper 注册中心唯一必须指定的属性,而在生产环境下,`address` 通常被指定为集群地址,如
+
+`address=zookeeper://10.20.153.10:2181?backup=10.20.153.11:2181,10.20.153.12:2181`
+
+protocol 与 address 分开配置的模式也可以,如
+
+`<dubbo:registry protocol="zookeeper" 
address="10.20.153.10:2181,10.20.153.11:2181,10.20.153.12:2181" />`
+
+## 3 高级配置
+### 3.1 认证与鉴权
+
+如果 Zookeeper 开启认证,Dubbo 支持指定 username、password 的方式传入身份标识。
+
+```yaml
+# application.yml
+dubbo:
+ registry:
+   address: zookeeper://localhost:2181
+   username: hello
+   password: 1234
+```
+
+也可以直接将参数扩展在 address 上 `address=zookeeper://hello:1234@localhost:2181`
+
+### 3.2 分组隔离
+通过指定 `group` 属性,可以在同一个 Zookeeper 
集群内实现微服务地址的逻辑隔离。比如可以在一套集群内隔离出多套开发环境,在地址发现层面实现隔离。
+
+```yaml
+# application.yml
+dubbo:
+ registry:
+   address: zookeeper://localhost:2181
+   group: daily1
+```
+### 3.3 其他扩展配置
+配置连接、会话过期时间
+```yaml
+# application.yml
+dubbo:
+ registry:
+   address: zookeeper://localhost:2181
+   timeout: 30 * 1000 # 连接超时时间,默认 30s
+   session: 60 * 1000 # 会话超时时间,默认 60s
+```
+
+## 4 工作原理
+
+### 4.1 Dubbo2 节点结构
+
+![/user-guide/images/zookeeper.jpg](/imgs/user/zookeeper.jpg)
+
+流程:
+* 服务提供者启动时:  向 `/dubbo/com.foo.BarService/providers` 目录下写入自己的 URL 地址。
+* 服务消费者启动时: 订阅 `/dubbo/com.foo.BarService/providers` 目录下的提供者 URL 地址。并向 
`/dubbo/com.foo.BarService/consumers` 目录下写入自己的 URL 地址
+* 监控中心启动时:   订阅 `/dubbo/com.foo.BarService` 目录下的所有提供者和消费者 URL 地址。
+
+支持以下功能:
+
+* 当提供者出现断电等异常停机时,注册中心能自动删除提供者信息
+* 当注册中心重启时,能自动恢复注册数据,以及订阅请求
+* 当会话过期时,能自动恢复注册数据,以及订阅请求
+* 当设置 `<dubbo:registry check="false" />` 时,记录失败注册和订阅请求,后台定时重试
+* 可通过 `<dubbo:registry username="admin" password="1234" />` 设置 zookeeper 登录信息
+* 可通过 `<dubbo:registry group="dubbo" />` 设置 zookeeper 的根节点,不配置将使用默认的根节点。
+* 支持 `*` 号通配符 `<dubbo:reference group="*" version="*" />`,可订阅服务的所有分组和所有版本的提供者


Reply via email to