You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2022/07/11 10:47:33 UTC

[shardingsphere] branch master updated: Refactor ha document (#19030)

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

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 884a1f54550 Refactor ha document (#19030)
884a1f54550 is described below

commit 884a1f54550a4429083666b391b309e968af6350
Author: zhaojinchao <zh...@apache.org>
AuthorDate: Mon Jul 11 18:47:26 2022 +0800

    Refactor ha document (#19030)
---
 docs/document/content/features/ha/_index.cn.md     | 38 ++++++++++++----
 docs/document/content/features/ha/_index.en.md     | 51 ++++++++++++++++------
 docs/document/content/features/ha/concept.cn.md    | 14 ------
 docs/document/content/features/ha/concept.en.md    | 14 ------
 docs/document/content/features/ha/use-norms.cn.md  | 13 ------
 docs/document/content/features/ha/use-norms.en.md  | 12 -----
 .../features/readwrite-splitting/_index.en.md      |  6 +--
 7 files changed, 69 insertions(+), 79 deletions(-)

diff --git a/docs/document/content/features/ha/_index.cn.md b/docs/document/content/features/ha/_index.cn.md
index 413fcc8d1a3..1a731c9e7a4 100644
--- a/docs/document/content/features/ha/_index.cn.md
+++ b/docs/document/content/features/ha/_index.cn.md
@@ -5,7 +5,7 @@ weight = 7
 chapter = true
 +++
 
-## 背景
+## 定义
 
 高可用是现代系统的最基本诉求,作为系统基石的数据库,对于高可用的要求也是必不可少的。
 
@@ -13,17 +13,37 @@ chapter = true
 对于有状态的存储节点来说,需要其自身具备数据一致性同步、探活、主节点选举等能力;
 对于无状态的计算节点来说,需要感知存储节点的变化的同时,还需要独立架设负载均衡器,并具备服务发现和请求分发的能力。
 
-Apache ShardingSphere 自身提供计算节点,并通过数据库作为存储节点。
-因此,它采用的高可用方案是利用数据库自身的高可用方案做存储节点高可用,并自动识别其变化。
+尽可能的保证 7X24 小时不间断的数据库服务,是 Apache ShardingSphere 高可用模块的主要设计目标。
 
-## 挑战
+## 核心概念
 
-Apache ShardingSphere 需要自动感知多样化的存储节点高可用方案的同时,也能够动态集成对读写分离方案,是实现的主要挑战。
+### 高可用类型
 
-![概述](https://shardingsphere.apache.org/document/current/img/discovery/overview.cn.png)
+Apache ShardingSphere 不提供数据库高可用的能力,它通过第三方提供的高可用方案感知数据库主从关系的切换。 确切来说,Apache ShardingSphere 提供数据库发现的能力,自动感知数据库主从关系,并修正计算节点对数据库的连接。
+
+### 动态读写分离
+高可用和读写分离一起使用时,读写分离无需配置具体的主库和从库。 高可用的数据源会动态的修正读写分离的主从关系,并正确地疏导读写流量。
+
+## 使用限制
+
+### 支持项
+* MySQL MGR 单主模式。
+* MySQL 主从复制模式。
+* openGauss 主从复制模式。
 
-## 目标
+### 不支持项
+* MySQL MGR 多主模式。
+
+## 原理介绍
+
+Apache ShardingSphere 提供的高可用方案,允许用户进行二次定制开发及实现扩展,主要分为四个步骤 : 前置检查、动态发现主库、动态发现从库、同步配置。
+
+![概述](https://shardingsphere.apache.org/document/current/img/discovery/overview.cn.png)
 
-**尽可能的保证 7*24 小时不间断的数据库服务,是 Apache ShardingSphere 高可用模块的主要设计目标。**
+## 相关参考
+[Java API](/cn/user-manual/shardingsphere-jdbc/java-api/rules/ha)\
+[YAML 配置](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/ha)\
+[Spring Boot Starter](/cn/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/ha)\
+[Spring 命名空间](/cn/user-manual/shardingsphere-jdbc/spring-namespace/rules/ha)
 
-**源码:https://github.com/apache/shardingsphere/tree/master/shardingsphere-features/shardingsphere-db-discovery**
+[源码](https://github.com/apache/shardingsphere/tree/master/shardingsphere-features/shardingsphere-db-discovery)
diff --git a/docs/document/content/features/ha/_index.en.md b/docs/document/content/features/ha/_index.en.md
index 17d491730bc..c008b0c46f8 100644
--- a/docs/document/content/features/ha/_index.en.md
+++ b/docs/document/content/features/ha/_index.en.md
@@ -5,27 +5,50 @@ weight = 7
 chapter = true
 +++
 
-## Background
+## Definition
 
-High availability is the most basic requirement of modern systems.
-As the cornerstone of the system, the database is also essential for high availability.
+High availability is the most basic requirement for modern systems. It is also an essential element of the database, which in turn is the cornerstone of any system.
+In a distributed database system, storage nodes and compute nodes are different in terms of their high availability schemes.
+Stateful storage nodes are required to have capabilities such as data consistency and synchronization, liveness probe, and primary-node election.
+Stateless compute nodes need to sense storage nodes' changes, setup load balancers independently, and enable service discovery and request distribution.
+Apache ShardingSphere' high availability module (HA) is mainly designed to ensure a 24/7 database service as much as possible.
 
-In the distributed database system with storage-compute splitting, the high availability solution of storage node and compute node are different.
-The stateful storage nodes need to pay attention to data consistency, health detection, primary node election and so on;
-The stateless compute nodes need to detect the changes of storage nodes, they also need to set up an independent load balancer and have the ability of service discovery and request distribution.
+## Related Concepts
 
-Apache ShardingSphere provides compute nodes and reuse database as storage nodes.
-Therefore, the high availability solution it adopts is to use the high availability solution of the database itself as the high availability of the storage node, and detect the changes automatically.
+### High Availability Type
 
-## Challenges
+Apache ShardingSphere does not provide database high availability capability. It senses the change of databases' primary-secondary relationship through a third-party provided high availability solution.
+Specifically, ShardingSphere is capable of finding databases, automatically sensing the primary/secondary database relationship, and correcting compute nodes' connections to databases.
 
-Apache ShardingSphere needs to detect high availability solution of diversified storage nodes automatically,
-and can also integrate the readwrite splitting dynamically, which is the main challenge of implementation.
+### Dynamic Read/Write Splitting
+
+When high availability and read/write splitting are adopted together, it is not necessary to configure specific primary and secondary databases for read/write splitting. 
+Highly available data sources dynamically correct the primary/secondary relationship of read/write splitting and properly channel read/write traffic.
+
+## Limitations
+
+### Supported
+* MySQL MGR single-primary mode
+* MySQL Primary/secondary replication mode
+* openGauss Primary/secondary replication mode
+
+### Not supported
+* MySQL MGR Multi-primary mode
+
+## How it works
+
+The high availability solution provided by Apache ShardingSphere allows you to carry out secondary custom development and achieve expansion, 
+which is mainly divided into four steps: pre-check, primary database dynamic discovery, secondary database dynamic discovery and configuration synchronization.
 
 ![Overview](https://shardingsphere.apache.org/document/current/img/discovery/overview.en.png)
 
-## Goal
+## Related References
+[Java API](/en/user-manual/shardingsphere-jdbc/java-api/rules/ha)\
+[YAML Configuration](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/ha)\
+[Spring Boot Starter](/en/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/ha)\
+[Spring Namespace](/en/user-manual/shardingsphere-jdbc/spring-namespace/rules/ha)
+
+[Source Code](https://github.com/apache/shardingsphere/tree/master/shardingsphere-features/shardingsphere-db-discovery)
+
 
-**The main goal of Apache ShardingSphere high availability module which is ensuring 7 * 24-hour uninterrupted database service as much as possible.**
 
-**Source Codes: https://github.com/apache/shardingsphere/tree/master/shardingsphere-features/shardingsphere-db-discovery**
diff --git a/docs/document/content/features/ha/concept.cn.md b/docs/document/content/features/ha/concept.cn.md
deleted file mode 100644
index 9a11aaaf4cf..00000000000
--- a/docs/document/content/features/ha/concept.cn.md
+++ /dev/null
@@ -1,14 +0,0 @@
-+++
-title = "核心概念"
-weight = 1
-+++
-
-## 高可用类型
-
-Apache ShardingSphere 不提供数据库高可用的能力,它通过第三方提供的高可用方案感知数据库主从关系的切换。
-确切来说,Apache ShardingSphere 提供数据库发现的能力,自动感知数据库主从关系,并修正计算节点对数据库的连接。
-
-## 动态读写分离
-
-高可用和读写分离一起使用时,读写分离无需配置具体的主库和从库。
-高可用的数据源会动态的修正读写分离的主从关系,并正确的疏导读写流量。
diff --git a/docs/document/content/features/ha/concept.en.md b/docs/document/content/features/ha/concept.en.md
deleted file mode 100644
index a9e54061ee4..00000000000
--- a/docs/document/content/features/ha/concept.en.md
+++ /dev/null
@@ -1,14 +0,0 @@
-+++
-title = "Core Concept"
-weight = 1
-+++
-
-## high Availability Type
-
-Apache ShardingSphere does not provide high availability solution of database, it reuses 3rd party high availability solution and auto-detect switch of primary and replica databases.
-Specifically, the ability of Apache ShardingSphere provided is database discovery, detect the primary and replica databases automatically, and updates the connection of compute nodes to the databases.
-
-## Dynamic Readwrite-Splitting
-
-When high availability and readwrite-splitting are used together, there is unnecessary to configure specific primary and replica databases for readwrite-splitting.
-Highly available data sources will update the primary and replica databases of readwrite-splitting dynamically, and route the query and update SQL correctly.
diff --git a/docs/document/content/features/ha/use-norms.cn.md b/docs/document/content/features/ha/use-norms.cn.md
deleted file mode 100644
index c06b3728ebd..00000000000
--- a/docs/document/content/features/ha/use-norms.cn.md
+++ /dev/null
@@ -1,13 +0,0 @@
-+++
-title = "使用规范"
-weight = 2
-+++
-
-## 支持项
-
-* MySQL MGR 单主模式。
-
-
-## 不支持项
-
-* MySQL MGR 多主模式。
diff --git a/docs/document/content/features/ha/use-norms.en.md b/docs/document/content/features/ha/use-norms.en.md
deleted file mode 100644
index 12d787dc309..00000000000
--- a/docs/document/content/features/ha/use-norms.en.md
+++ /dev/null
@@ -1,12 +0,0 @@
-+++
-title = "Use Norms"
-weight = 2
-+++
-
-## Supported
-
-* MySQL MGR single-primary mode.
-
-## Unsupported
-
-* MySQL MGR multi-primary mode.
diff --git a/docs/document/content/features/readwrite-splitting/_index.en.md b/docs/document/content/features/readwrite-splitting/_index.en.md
index 44f91f6e000..db05660554b 100644
--- a/docs/document/content/features/readwrite-splitting/_index.en.md
+++ b/docs/document/content/features/readwrite-splitting/_index.en.md
@@ -45,6 +45,6 @@ Users can also expand the required algorithm according to the SPI mechanism. As
 
 ## 相关参考
 [Java API](/en/user-manual/shardingsphere-jdbc/java-api/rules/readwrite-splitting)\
-[YAML Configuration](/cn/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting)\
-[Spring Boot Starter](/cn/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/readwrite-splitting)\
-[Spring Namespace](/cn/user-manual/shardingsphere-jdbc/spring-namespace/rules/readwrite-splitting)
+[YAML Configuration](/en/user-manual/shardingsphere-jdbc/yaml-config/rules/readwrite-splitting)\
+[Spring Boot Starter](/en/user-manual/shardingsphere-jdbc/spring-boot-starter/rules/readwrite-splitting)\
+[Spring Namespace](/en/user-manual/shardingsphere-jdbc/spring-namespace/rules/readwrite-splitting)