diff --git a/docs/v2/guide/user/failover.md b/docs/v2/guide/user/failover.md
new file mode 100644
index 00000000000..e872b67af1f
--- /dev/null
+++ b/docs/v2/guide/user/failover.md
@@ -0,0 +1 @@
+Placeholder. DO NOT DELETE.
\ No newline at end of file
diff --git a/i18n/en/docusaurus-plugin-content-docs/current/v2/guide/user/failover.md b/i18n/en/docusaurus-plugin-content-docs/current/v2/guide/user/failover.md
new file mode 100644
index 00000000000..4ff7c60e607
--- /dev/null
+++ b/i18n/en/docusaurus-plugin-content-docs/current/v2/guide/user/failover.md
@@ -0,0 +1,144 @@
+---
+title: Java Client Failover
+keywords: [Failover]
+description: Java client failover user guide
+---
+
+# Java Client Failover
+
+We can turn on the local data failover feature to handle the situation when Nacos server side is unstable or has problematic data.
+
+There are two typical scenarios:
+
+1. When Nacos server is in deployment, we can switch on the failover so the clients use local data only. The data anomaly or oscillation at Nacos server won't affect the clients. After the deployment and the data verification are done, we can switch off the failover feature.
+2. When there is a sudden data anomaly at Nacos server at runtime, we can turn on the failover feature to prevent Nacos clients using wrong data.
+
+The full detailed solution description can be found in https://github.com/alibaba/nacos/issues/11053
+
+## Procedures
+
+
+
+As shown above, the query requests to Nacos client would first be checked by FailoverReactor, and only if FailoverReactor has no related data, can the requests move on to query ServiceInfoHolder.
+
+## Disk based Failover
+
+FailoverReactor can select different data sources. Disk is the default option.
+
+### Disk Failover File Path
+
+The default path of disk failover files are:
+
+```
+{user.home}/nacos/naming/{namespace}/failover
+```
+
+This path can be customised via -D argument:
+
+```
+-DJM.SNAPSHOT.PATH=/mypath
+```
+
+So the path becomes:
+
+```
+/mypath/nacos/naming/{namespace}/failover
+```
+
+### Disk Failover Switch
+
+The disk failover switch is stored in a file with name:
+
+```
+00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
+```
+
+The content of this file is just a number 0 or 1, where 0 represents failover is off, 1 is on.
+
+### Disk Failover Data
+
+The disk failover data is stored in multiple files under the failover path. Each file stores the failover data for a single service.
+
+The file name is in the following format:
+
+```
+{group.name}%40%40{service.name}
+```
+The content in the file is the JSON string of one ServiceInfo object, for instance:
+
+```
+{
+ "name":"DEFAULT_GROUP@@test.2",
+ "groupName":"DEFAULT_GROUP",
+ "clusters":"",
+ "cacheMillis":10000,
+ "hosts":[
+ {
+ "instanceId":"1.1.2.1#8888#DEFAULT#DEFAULT_GROUP@@test.2",
+ "ip":"1.1.2.1",
+ "port":8888,
+ "weight":1,
+ "healthy":true,
+ "enabled":true,
+ "ephemeral":true,
+ "clusterName":"DEFAULT",
+ "serviceName":"DEFAULT_GROUP@@test.2",
+ "metadata":{
+ "k1":"v1"
+ },
+ "instanceHeartBeatInterval":5000,
+ "instanceHeartBeatTimeOut":15000,
+ "ipDeleteTimeout":30000
+ }
+ ],
+ "lastRefTime":1689835375819,
+ "checksum":"",
+ "allIPs":false,
+ "reachProtectionThreshold":false,
+ "valid":true
+}
+```
+
+## Extent Failover Data Source
+
+Disk failover is simple and requires no extra remote components. But sometimes we may want to use another kind of data source, such as Redis, Mysql, etc.
+
+Now we support extending the failover data source with SPI mechanism. Here are the steps:
+
+### Develop Your Own Failover Data Source
+
+Write a class and implement the interface com.alibaba.nacos.client.naming.backups.FailoverDataSource:
+
+```
+public class MyFailoverDataSource implements FailoverDataSource {
+
+ @Override
+ public FailoverSwitch getSwitch() {
+ // TODO write your own implementation.
+ return null;
+ }
+
+ @Override
+ public Map getFailoverData() {
+ // TODO write your own implementation. For naming module, the map
+ // should contain failover data with service name as key and ServiceInfo as value
+ return null;
+ }
+}
+```
+
+### Configure Failover Data Source Class
+
+Create a file under the resource root path:
+
+```
+{resource.root}/META-INF/services/com.alibaba.nacos.client.naming.backups.FailoverDataSource
+```
+
+One example of `{resource.root}` is src/main/resources.
+
+The file content is:
+
+```
+your.package.MyFailoverDataSource
+```
\ No newline at end of file
diff --git a/i18n/en/docusaurus-plugin-content-docs/version-1.X/v2/guide/user/failover.md b/i18n/en/docusaurus-plugin-content-docs/version-1.X/v2/guide/user/failover.md
new file mode 100644
index 00000000000..4ff7c60e607
--- /dev/null
+++ b/i18n/en/docusaurus-plugin-content-docs/version-1.X/v2/guide/user/failover.md
@@ -0,0 +1,144 @@
+---
+title: Java Client Failover
+keywords: [Failover]
+description: Java client failover user guide
+---
+
+# Java Client Failover
+
+We can turn on the local data failover feature to handle the situation when Nacos server side is unstable or has problematic data.
+
+There are two typical scenarios:
+
+1. When Nacos server is in deployment, we can switch on the failover so the clients use local data only. The data anomaly or oscillation at Nacos server won't affect the clients. After the deployment and the data verification are done, we can switch off the failover feature.
+2. When there is a sudden data anomaly at Nacos server at runtime, we can turn on the failover feature to prevent Nacos clients using wrong data.
+
+The full detailed solution description can be found in https://github.com/alibaba/nacos/issues/11053
+
+## Procedures
+
+
+
+As shown above, the query requests to Nacos client would first be checked by FailoverReactor, and only if FailoverReactor has no related data, can the requests move on to query ServiceInfoHolder.
+
+## Disk based Failover
+
+FailoverReactor can select different data sources. Disk is the default option.
+
+### Disk Failover File Path
+
+The default path of disk failover files are:
+
+```
+{user.home}/nacos/naming/{namespace}/failover
+```
+
+This path can be customised via -D argument:
+
+```
+-DJM.SNAPSHOT.PATH=/mypath
+```
+
+So the path becomes:
+
+```
+/mypath/nacos/naming/{namespace}/failover
+```
+
+### Disk Failover Switch
+
+The disk failover switch is stored in a file with name:
+
+```
+00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
+```
+
+The content of this file is just a number 0 or 1, where 0 represents failover is off, 1 is on.
+
+### Disk Failover Data
+
+The disk failover data is stored in multiple files under the failover path. Each file stores the failover data for a single service.
+
+The file name is in the following format:
+
+```
+{group.name}%40%40{service.name}
+```
+The content in the file is the JSON string of one ServiceInfo object, for instance:
+
+```
+{
+ "name":"DEFAULT_GROUP@@test.2",
+ "groupName":"DEFAULT_GROUP",
+ "clusters":"",
+ "cacheMillis":10000,
+ "hosts":[
+ {
+ "instanceId":"1.1.2.1#8888#DEFAULT#DEFAULT_GROUP@@test.2",
+ "ip":"1.1.2.1",
+ "port":8888,
+ "weight":1,
+ "healthy":true,
+ "enabled":true,
+ "ephemeral":true,
+ "clusterName":"DEFAULT",
+ "serviceName":"DEFAULT_GROUP@@test.2",
+ "metadata":{
+ "k1":"v1"
+ },
+ "instanceHeartBeatInterval":5000,
+ "instanceHeartBeatTimeOut":15000,
+ "ipDeleteTimeout":30000
+ }
+ ],
+ "lastRefTime":1689835375819,
+ "checksum":"",
+ "allIPs":false,
+ "reachProtectionThreshold":false,
+ "valid":true
+}
+```
+
+## Extent Failover Data Source
+
+Disk failover is simple and requires no extra remote components. But sometimes we may want to use another kind of data source, such as Redis, Mysql, etc.
+
+Now we support extending the failover data source with SPI mechanism. Here are the steps:
+
+### Develop Your Own Failover Data Source
+
+Write a class and implement the interface com.alibaba.nacos.client.naming.backups.FailoverDataSource:
+
+```
+public class MyFailoverDataSource implements FailoverDataSource {
+
+ @Override
+ public FailoverSwitch getSwitch() {
+ // TODO write your own implementation.
+ return null;
+ }
+
+ @Override
+ public Map getFailoverData() {
+ // TODO write your own implementation. For naming module, the map
+ // should contain failover data with service name as key and ServiceInfo as value
+ return null;
+ }
+}
+```
+
+### Configure Failover Data Source Class
+
+Create a file under the resource root path:
+
+```
+{resource.root}/META-INF/services/com.alibaba.nacos.client.naming.backups.FailoverDataSource
+```
+
+One example of `{resource.root}` is src/main/resources.
+
+The file content is:
+
+```
+your.package.MyFailoverDataSource
+```
\ No newline at end of file
diff --git a/i18n/en/docusaurus-plugin-content-docs/version-2.X/v2/guide/user/failover.md b/i18n/en/docusaurus-plugin-content-docs/version-2.X/v2/guide/user/failover.md
new file mode 100644
index 00000000000..4ff7c60e607
--- /dev/null
+++ b/i18n/en/docusaurus-plugin-content-docs/version-2.X/v2/guide/user/failover.md
@@ -0,0 +1,144 @@
+---
+title: Java Client Failover
+keywords: [Failover]
+description: Java client failover user guide
+---
+
+# Java Client Failover
+
+We can turn on the local data failover feature to handle the situation when Nacos server side is unstable or has problematic data.
+
+There are two typical scenarios:
+
+1. When Nacos server is in deployment, we can switch on the failover so the clients use local data only. The data anomaly or oscillation at Nacos server won't affect the clients. After the deployment and the data verification are done, we can switch off the failover feature.
+2. When there is a sudden data anomaly at Nacos server at runtime, we can turn on the failover feature to prevent Nacos clients using wrong data.
+
+The full detailed solution description can be found in https://github.com/alibaba/nacos/issues/11053
+
+## Procedures
+
+
+
+As shown above, the query requests to Nacos client would first be checked by FailoverReactor, and only if FailoverReactor has no related data, can the requests move on to query ServiceInfoHolder.
+
+## Disk based Failover
+
+FailoverReactor can select different data sources. Disk is the default option.
+
+### Disk Failover File Path
+
+The default path of disk failover files are:
+
+```
+{user.home}/nacos/naming/{namespace}/failover
+```
+
+This path can be customised via -D argument:
+
+```
+-DJM.SNAPSHOT.PATH=/mypath
+```
+
+So the path becomes:
+
+```
+/mypath/nacos/naming/{namespace}/failover
+```
+
+### Disk Failover Switch
+
+The disk failover switch is stored in a file with name:
+
+```
+00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
+```
+
+The content of this file is just a number 0 or 1, where 0 represents failover is off, 1 is on.
+
+### Disk Failover Data
+
+The disk failover data is stored in multiple files under the failover path. Each file stores the failover data for a single service.
+
+The file name is in the following format:
+
+```
+{group.name}%40%40{service.name}
+```
+The content in the file is the JSON string of one ServiceInfo object, for instance:
+
+```
+{
+ "name":"DEFAULT_GROUP@@test.2",
+ "groupName":"DEFAULT_GROUP",
+ "clusters":"",
+ "cacheMillis":10000,
+ "hosts":[
+ {
+ "instanceId":"1.1.2.1#8888#DEFAULT#DEFAULT_GROUP@@test.2",
+ "ip":"1.1.2.1",
+ "port":8888,
+ "weight":1,
+ "healthy":true,
+ "enabled":true,
+ "ephemeral":true,
+ "clusterName":"DEFAULT",
+ "serviceName":"DEFAULT_GROUP@@test.2",
+ "metadata":{
+ "k1":"v1"
+ },
+ "instanceHeartBeatInterval":5000,
+ "instanceHeartBeatTimeOut":15000,
+ "ipDeleteTimeout":30000
+ }
+ ],
+ "lastRefTime":1689835375819,
+ "checksum":"",
+ "allIPs":false,
+ "reachProtectionThreshold":false,
+ "valid":true
+}
+```
+
+## Extent Failover Data Source
+
+Disk failover is simple and requires no extra remote components. But sometimes we may want to use another kind of data source, such as Redis, Mysql, etc.
+
+Now we support extending the failover data source with SPI mechanism. Here are the steps:
+
+### Develop Your Own Failover Data Source
+
+Write a class and implement the interface com.alibaba.nacos.client.naming.backups.FailoverDataSource:
+
+```
+public class MyFailoverDataSource implements FailoverDataSource {
+
+ @Override
+ public FailoverSwitch getSwitch() {
+ // TODO write your own implementation.
+ return null;
+ }
+
+ @Override
+ public Map getFailoverData() {
+ // TODO write your own implementation. For naming module, the map
+ // should contain failover data with service name as key and ServiceInfo as value
+ return null;
+ }
+}
+```
+
+### Configure Failover Data Source Class
+
+Create a file under the resource root path:
+
+```
+{resource.root}/META-INF/services/com.alibaba.nacos.client.naming.backups.FailoverDataSource
+```
+
+One example of `{resource.root}` is src/main/resources.
+
+The file content is:
+
+```
+your.package.MyFailoverDataSource
+```
\ No newline at end of file
diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/current/v2/guide/user/failover.md b/i18n/zh-cn/docusaurus-plugin-content-docs/current/v2/guide/user/failover.md
new file mode 100644
index 00000000000..8f48458c74f
--- /dev/null
+++ b/i18n/zh-cn/docusaurus-plugin-content-docs/current/v2/guide/user/failover.md
@@ -0,0 +1,141 @@
+---
+title: Java客户端容灾
+keywords: [容灾]
+description: Java客户端容灾用户指南
+---
+
+# Java客户端容灾
+
+我们可以在客户端开启本地容灾,用来应对Nacos服务端出现问题时,保证客户端的数据和接口稳定性。
+
+这里有两个使用场景:
+
+1. 在Nacos服务端发布的时候,我们主动把容灾打开,这样客户端只使用本地容灾数据,Nacos服务的数据抖动或者数据错误都不会影响客户端,我们在Nacos服务端升级完成并且数据验证没问题后再关闭容灾;
+2. 在Nacos运行期间,突然出现接口不可用或者数据异常,我们可以快速的开启容灾,让客户端使用容灾数据,减小服务受影响的窗口,等Nacos服务端恢复后再关闭容灾;
+
+具体方案可以参考:https://github.com/alibaba/nacos/issues/11053
+
+## 流程简介
+
+
+
+如上图所示,客户端的查询请求都会先经过FailoverReactor,如果FailoverReactor有数据,则直接使用,从而忽略掉Nacos Server返回的数据;如果FailoverReactor里面没有数据,则走正常流程,从ServiceInfoHolder里读取缓存;
+
+## 磁盘容灾
+
+FailoverReactor里的数据可以使用不同的数据源,默认的数据源为磁盘。
+
+### 磁盘容灾文件目录
+
+默认的磁盘容灾文件目录为:
+
+```
+{user.home}/nacos/naming/{namespace}/failover
+```
+
+这个目录可以定制,如果设置了-D参数:
+
+```
+-DJM.SNAPSHOT.PATH=/mypath
+```
+
+则容灾磁盘文件目录变为:
+
+```
+/mypath/nacos/naming/{namespace}/failover
+```
+
+### 磁盘容灾开关
+
+容灾开关存放在磁盘容灾文件目录下的一个文件里,具体文件名为:
+
+```
+00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
+```
+
+文件里存放一个数字0或者1,0代表关闭容灾,1代表打开容灾
+
+### 磁盘容灾数据
+
+容灾的数据分成多个文件,都是存放在磁盘容灾文件目录下,每一个文件存储一个单独的服务的容灾数据,每个文件的文件名格式如下:
+
+```
+{group.name}%40%40{service.name}
+```
+
+里面的内容为客户端的ServiceInfo类的JSON序列化字符串,例如:
+
+```
+{
+ "name":"DEFAULT_GROUP@@test.2",
+ "groupName":"DEFAULT_GROUP",
+ "clusters":"",
+ "cacheMillis":10000,
+ "hosts":[
+ {
+ "instanceId":"1.1.2.1#8888#DEFAULT#DEFAULT_GROUP@@test.2",
+ "ip":"1.1.2.1",
+ "port":8888,
+ "weight":1,
+ "healthy":true,
+ "enabled":true,
+ "ephemeral":true,
+ "clusterName":"DEFAULT",
+ "serviceName":"DEFAULT_GROUP@@test.2",
+ "metadata":{
+ "k1":"v1"
+ },
+ "instanceHeartBeatInterval":5000,
+ "instanceHeartBeatTimeOut":15000,
+ "ipDeleteTimeout":30000
+ }
+ ],
+ "lastRefTime":1689835375819,
+ "checksum":"",
+ "allIPs":false,
+ "reachProtectionThreshold":false,
+ "valid":true
+}
+```
+
+## 扩展容灾数据源
+
+磁盘容灾不需要外部依赖,逻辑比较简单,但是管理起来不太方便。因此我们也支持使用SPI来扩展容灾数据源,使用磁盘以外的存储。以下是扩展的步骤。
+
+### 开发自己的容灾数据源类
+
+编写一个类,实现接口com.alibaba.nacos.client.naming.backups.FailoverDataSource:
+
+```
+public class MyFailoverDataSource implements FailoverDataSource {
+
+ @Override
+ public FailoverSwitch getSwitch() {
+ // TODO write your own implementation.
+ return null;
+ }
+
+ @Override
+ public Map getFailoverData() {
+ // TODO write your own implementation. For naming module, the map
+ // should contain failover data with service name as key and ServiceInfo as value
+ return null;
+ }
+}
+```
+
+### 配置容灾数据源类
+
+在资源目录下新建文件:
+
+```
+{resource.root}/META-INF/services/com.alibaba.nacos.client.naming.backups.FailoverDataSource
+```
+
+{resource.root}的一个例子是src/main/resources。
+
+文件内容为:
+
+```
+your.package.MyFailoverDataSource
+```
\ No newline at end of file
diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.X/v2/guide/user/failover.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.X/v2/guide/user/failover.md
new file mode 100644
index 00000000000..8f48458c74f
--- /dev/null
+++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-1.X/v2/guide/user/failover.md
@@ -0,0 +1,141 @@
+---
+title: Java客户端容灾
+keywords: [容灾]
+description: Java客户端容灾用户指南
+---
+
+# Java客户端容灾
+
+我们可以在客户端开启本地容灾,用来应对Nacos服务端出现问题时,保证客户端的数据和接口稳定性。
+
+这里有两个使用场景:
+
+1. 在Nacos服务端发布的时候,我们主动把容灾打开,这样客户端只使用本地容灾数据,Nacos服务的数据抖动或者数据错误都不会影响客户端,我们在Nacos服务端升级完成并且数据验证没问题后再关闭容灾;
+2. 在Nacos运行期间,突然出现接口不可用或者数据异常,我们可以快速的开启容灾,让客户端使用容灾数据,减小服务受影响的窗口,等Nacos服务端恢复后再关闭容灾;
+
+具体方案可以参考:https://github.com/alibaba/nacos/issues/11053
+
+## 流程简介
+
+
+
+如上图所示,客户端的查询请求都会先经过FailoverReactor,如果FailoverReactor有数据,则直接使用,从而忽略掉Nacos Server返回的数据;如果FailoverReactor里面没有数据,则走正常流程,从ServiceInfoHolder里读取缓存;
+
+## 磁盘容灾
+
+FailoverReactor里的数据可以使用不同的数据源,默认的数据源为磁盘。
+
+### 磁盘容灾文件目录
+
+默认的磁盘容灾文件目录为:
+
+```
+{user.home}/nacos/naming/{namespace}/failover
+```
+
+这个目录可以定制,如果设置了-D参数:
+
+```
+-DJM.SNAPSHOT.PATH=/mypath
+```
+
+则容灾磁盘文件目录变为:
+
+```
+/mypath/nacos/naming/{namespace}/failover
+```
+
+### 磁盘容灾开关
+
+容灾开关存放在磁盘容灾文件目录下的一个文件里,具体文件名为:
+
+```
+00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
+```
+
+文件里存放一个数字0或者1,0代表关闭容灾,1代表打开容灾
+
+### 磁盘容灾数据
+
+容灾的数据分成多个文件,都是存放在磁盘容灾文件目录下,每一个文件存储一个单独的服务的容灾数据,每个文件的文件名格式如下:
+
+```
+{group.name}%40%40{service.name}
+```
+
+里面的内容为客户端的ServiceInfo类的JSON序列化字符串,例如:
+
+```
+{
+ "name":"DEFAULT_GROUP@@test.2",
+ "groupName":"DEFAULT_GROUP",
+ "clusters":"",
+ "cacheMillis":10000,
+ "hosts":[
+ {
+ "instanceId":"1.1.2.1#8888#DEFAULT#DEFAULT_GROUP@@test.2",
+ "ip":"1.1.2.1",
+ "port":8888,
+ "weight":1,
+ "healthy":true,
+ "enabled":true,
+ "ephemeral":true,
+ "clusterName":"DEFAULT",
+ "serviceName":"DEFAULT_GROUP@@test.2",
+ "metadata":{
+ "k1":"v1"
+ },
+ "instanceHeartBeatInterval":5000,
+ "instanceHeartBeatTimeOut":15000,
+ "ipDeleteTimeout":30000
+ }
+ ],
+ "lastRefTime":1689835375819,
+ "checksum":"",
+ "allIPs":false,
+ "reachProtectionThreshold":false,
+ "valid":true
+}
+```
+
+## 扩展容灾数据源
+
+磁盘容灾不需要外部依赖,逻辑比较简单,但是管理起来不太方便。因此我们也支持使用SPI来扩展容灾数据源,使用磁盘以外的存储。以下是扩展的步骤。
+
+### 开发自己的容灾数据源类
+
+编写一个类,实现接口com.alibaba.nacos.client.naming.backups.FailoverDataSource:
+
+```
+public class MyFailoverDataSource implements FailoverDataSource {
+
+ @Override
+ public FailoverSwitch getSwitch() {
+ // TODO write your own implementation.
+ return null;
+ }
+
+ @Override
+ public Map getFailoverData() {
+ // TODO write your own implementation. For naming module, the map
+ // should contain failover data with service name as key and ServiceInfo as value
+ return null;
+ }
+}
+```
+
+### 配置容灾数据源类
+
+在资源目录下新建文件:
+
+```
+{resource.root}/META-INF/services/com.alibaba.nacos.client.naming.backups.FailoverDataSource
+```
+
+{resource.root}的一个例子是src/main/resources。
+
+文件内容为:
+
+```
+your.package.MyFailoverDataSource
+```
\ No newline at end of file
diff --git a/i18n/zh-cn/docusaurus-plugin-content-docs/version-2.X/v2/guide/user/failover.md b/i18n/zh-cn/docusaurus-plugin-content-docs/version-2.X/v2/guide/user/failover.md
new file mode 100644
index 00000000000..8f48458c74f
--- /dev/null
+++ b/i18n/zh-cn/docusaurus-plugin-content-docs/version-2.X/v2/guide/user/failover.md
@@ -0,0 +1,141 @@
+---
+title: Java客户端容灾
+keywords: [容灾]
+description: Java客户端容灾用户指南
+---
+
+# Java客户端容灾
+
+我们可以在客户端开启本地容灾,用来应对Nacos服务端出现问题时,保证客户端的数据和接口稳定性。
+
+这里有两个使用场景:
+
+1. 在Nacos服务端发布的时候,我们主动把容灾打开,这样客户端只使用本地容灾数据,Nacos服务的数据抖动或者数据错误都不会影响客户端,我们在Nacos服务端升级完成并且数据验证没问题后再关闭容灾;
+2. 在Nacos运行期间,突然出现接口不可用或者数据异常,我们可以快速的开启容灾,让客户端使用容灾数据,减小服务受影响的窗口,等Nacos服务端恢复后再关闭容灾;
+
+具体方案可以参考:https://github.com/alibaba/nacos/issues/11053
+
+## 流程简介
+
+
+
+如上图所示,客户端的查询请求都会先经过FailoverReactor,如果FailoverReactor有数据,则直接使用,从而忽略掉Nacos Server返回的数据;如果FailoverReactor里面没有数据,则走正常流程,从ServiceInfoHolder里读取缓存;
+
+## 磁盘容灾
+
+FailoverReactor里的数据可以使用不同的数据源,默认的数据源为磁盘。
+
+### 磁盘容灾文件目录
+
+默认的磁盘容灾文件目录为:
+
+```
+{user.home}/nacos/naming/{namespace}/failover
+```
+
+这个目录可以定制,如果设置了-D参数:
+
+```
+-DJM.SNAPSHOT.PATH=/mypath
+```
+
+则容灾磁盘文件目录变为:
+
+```
+/mypath/nacos/naming/{namespace}/failover
+```
+
+### 磁盘容灾开关
+
+容灾开关存放在磁盘容灾文件目录下的一个文件里,具体文件名为:
+
+```
+00-00---000-VIPSRV_FAILOVER_SWITCH-000---00-00
+```
+
+文件里存放一个数字0或者1,0代表关闭容灾,1代表打开容灾
+
+### 磁盘容灾数据
+
+容灾的数据分成多个文件,都是存放在磁盘容灾文件目录下,每一个文件存储一个单独的服务的容灾数据,每个文件的文件名格式如下:
+
+```
+{group.name}%40%40{service.name}
+```
+
+里面的内容为客户端的ServiceInfo类的JSON序列化字符串,例如:
+
+```
+{
+ "name":"DEFAULT_GROUP@@test.2",
+ "groupName":"DEFAULT_GROUP",
+ "clusters":"",
+ "cacheMillis":10000,
+ "hosts":[
+ {
+ "instanceId":"1.1.2.1#8888#DEFAULT#DEFAULT_GROUP@@test.2",
+ "ip":"1.1.2.1",
+ "port":8888,
+ "weight":1,
+ "healthy":true,
+ "enabled":true,
+ "ephemeral":true,
+ "clusterName":"DEFAULT",
+ "serviceName":"DEFAULT_GROUP@@test.2",
+ "metadata":{
+ "k1":"v1"
+ },
+ "instanceHeartBeatInterval":5000,
+ "instanceHeartBeatTimeOut":15000,
+ "ipDeleteTimeout":30000
+ }
+ ],
+ "lastRefTime":1689835375819,
+ "checksum":"",
+ "allIPs":false,
+ "reachProtectionThreshold":false,
+ "valid":true
+}
+```
+
+## 扩展容灾数据源
+
+磁盘容灾不需要外部依赖,逻辑比较简单,但是管理起来不太方便。因此我们也支持使用SPI来扩展容灾数据源,使用磁盘以外的存储。以下是扩展的步骤。
+
+### 开发自己的容灾数据源类
+
+编写一个类,实现接口com.alibaba.nacos.client.naming.backups.FailoverDataSource:
+
+```
+public class MyFailoverDataSource implements FailoverDataSource {
+
+ @Override
+ public FailoverSwitch getSwitch() {
+ // TODO write your own implementation.
+ return null;
+ }
+
+ @Override
+ public Map getFailoverData() {
+ // TODO write your own implementation. For naming module, the map
+ // should contain failover data with service name as key and ServiceInfo as value
+ return null;
+ }
+}
+```
+
+### 配置容灾数据源类
+
+在资源目录下新建文件:
+
+```
+{resource.root}/META-INF/services/com.alibaba.nacos.client.naming.backups.FailoverDataSource
+```
+
+{resource.root}的一个例子是src/main/resources。
+
+文件内容为:
+
+```
+your.package.MyFailoverDataSource
+```
\ No newline at end of file
diff --git a/sidebars.js b/sidebars.js
index 16a0fdd3bc8..ed12ae56692 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -43,7 +43,7 @@ const sidebars = {
type: 'category',
label: 'User Guide',
collapsible: false,
- items: ['v2/guide/user/sdk', 'v2/guide/user/other-language', 'v2/guide/user/open-api','v2/guide/user/auth','v2/guide/user/faq','v2/guide/user/parameters-check'],
+ items: ['v2/guide/user/sdk', 'v2/guide/user/other-language', 'v2/guide/user/open-api','v2/guide/user/auth','v2/guide/user/faq','v2/guide/user/parameters-check','v2/guide/user/failover'],
},
{
type: 'category',
diff --git a/versioned_docs/version-1.X/v2/guide/user/failover.md b/versioned_docs/version-1.X/v2/guide/user/failover.md
new file mode 100644
index 00000000000..e872b67af1f
--- /dev/null
+++ b/versioned_docs/version-1.X/v2/guide/user/failover.md
@@ -0,0 +1 @@
+Placeholder. DO NOT DELETE.
\ No newline at end of file
diff --git a/versioned_docs/version-2.X/v2/guide/user/failover.md b/versioned_docs/version-2.X/v2/guide/user/failover.md
new file mode 100644
index 00000000000..e872b67af1f
--- /dev/null
+++ b/versioned_docs/version-2.X/v2/guide/user/failover.md
@@ -0,0 +1 @@
+Placeholder. DO NOT DELETE.
\ No newline at end of file
diff --git a/versioned_sidebars/version-1.X-sidebars.json b/versioned_sidebars/version-1.X-sidebars.json
index ee0788bc1b4..f978cf44478 100644
--- a/versioned_sidebars/version-1.X-sidebars.json
+++ b/versioned_sidebars/version-1.X-sidebars.json
@@ -50,7 +50,8 @@
"v2/guide/user/other-language",
"v2/guide/user/open-api",
"v2/guide/user/auth",
- "v2/guide/user/faq"
+ "v2/guide/user/faq",
+ "v2/guide/user/failover"
]
},
{
diff --git a/versioned_sidebars/version-2.X-sidebars.json b/versioned_sidebars/version-2.X-sidebars.json
index ee0788bc1b4..f978cf44478 100644
--- a/versioned_sidebars/version-2.X-sidebars.json
+++ b/versioned_sidebars/version-2.X-sidebars.json
@@ -50,7 +50,8 @@
"v2/guide/user/other-language",
"v2/guide/user/open-api",
"v2/guide/user/auth",
- "v2/guide/user/faq"
+ "v2/guide/user/faq",
+ "v2/guide/user/failover"
]
},
{