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

panjuan 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 b7db01c1831 add read-write-split load balance algorithm doc (#19216)
b7db01c1831 is described below

commit b7db01c1831a9bbff2edc1880f547d230e4b54f2
Author: JingShang Lu <[email protected]>
AuthorDate: Fri Jul 15 15:27:21 2022 +0800

    add read-write-split load balance algorithm doc (#19216)
    
    * add read-write-split load balance algorithm doc
    
    * fix
---
 .../builtin-algorithm/load-balance.cn.md           | 35 ++++++++--------------
 .../builtin-algorithm/load-balance.en.md           | 35 ++++++++--------------
 2 files changed, 24 insertions(+), 46 deletions(-)

diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.cn.md
index 3a2555dca44..c7e570d37bc 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.cn.md
@@ -9,29 +9,18 @@ ShardingSphere 内置提供了多种负载均衡算法,具体包括了轮询
 
 ## 参数解释
 
-### 轮询算法
-
-类型:ROUND_ROBIN
-
-可配置属性:无
-
-### 随机访问算法
-
-类型:RANDOM
-
-可配置属性:无
-
-### 权重访问算法
-
-类型:WEIGHT
-
-可配置属性:
-
-> 使用中的读库都必须配置权重
-
-| *属性名称*                     | *数据类型* | *说明*                                   
      |
-| ------------------------------ | ---------- | 
---------------------------------------------- |
-| \- <read-data_source-name> (+) | double     | 
属性名字使用读库名字,参数填写读库对应的权重值。权重参数范围最小值 > 0,合计 <= Double.MAX_VALUE。  |
+|    *Type*   | *Describe* | *Limitations* |
+| -------- | ------------- | ------------ |
+| ROUND_ROBIN  | 事务内,读请求路由到 primary,事务外,采用轮询策略路由到 replica | |
+| RANDOM    |事务内,读请求路由到 primary,事务外,采用随机策略路由到 replica| |
+| WEIGHT    | 事务内,读请求路由到 primary,事务外,采用权重策略路由到 replica| 
需配置属性,属性名:${replica-name},数据类型:double, 属性名字使用读库名字,参数填写读库对应的权重值。权重参数范围最小值 > 0,合计 
<= Double.MAX_VALUE。|
+| TRANSACTION_RANDOM  |显示/非显示开启事务,读请求采用随机策略路由到多个 replica| |
+| TRANSACTION_ROUND_ROBIN  |显示/非显示开启事务,读请求采用轮询策略路由到多个 replica| |
+| TRANSACTION_WEIGHT  |显示/非显示开启事务,读请求采用权重策略路由到多个 replica| 
需配置属性,属性名:${replica-name},数据类型:double, 属性名字使用读库名字,参数填写读库对应的权重值。权重参数范围最小值 > 0,合计 
<= Double.MAX_VALUE。 |
+| FIXED_REPLICA_RANDOM  |显示开启事务,读请求采用随机策略路由到一个固定 
replica;不开事务,每次读流量使用随机策略路由到不同的 replica| |
+| FIXED_REPLICA_ROUND_ROBIN  |显示开启事务,读请求采用轮询策略路由到一个固定 
replica;不开事务,每次读流量使用轮询策略路由到不同的 replica| |
+| FIXED_REPLICA_WEIGHT  |显示开启事务,读请求采用权重策略路由到一个固定 
replica;不开事务,每次读流量使用权重策略路由到不同的 replica| 需配置属性,属性名:${replica-name},数据类型:double, 
属性名字使用读库名字,参数填写读库对应的权重值。权重参数范围最小值 > 0,合计 <= Double.MAX_VALUE。 |
+| FIXED_PRIMARY  |读请求全部路由到 primary|
 
 ## 操作步骤
 
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.en.md
index 7c5a121e9a7..f5c5a597a9b 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/builtin-algorithm/load-balance.en.md
@@ -11,29 +11,18 @@ Moreover, considering the complexity of the business 
scenario, the built-in algo
 
 ## Parameters
 
-### Round Robin Algorithm
-
-Type: ROUND_ROBIN
-
-Attributes: None
-
-### Random Algorithm
-
-Type: RANDOM
-
-Attributes: None
-
-### Weight Algorithm
-
-Type: WEIGHT
-
-Attributes: 
-
-> All read data in use must be configured with weights
-
-| *Name*                 | *DataType* | *Description*                          
    |
-| ---------------------------------- | ---------- | 
---------------------------------------------- |
-| \- <read-data_source-name> (+) | double     | The attribute name uses the 
read database name, and the parameter fills in the weight value corresponding 
to the read database.The minimum value of the weight parameter range>0,the 
total <=Double.MAX_VALUE. |
+|    *Type*   | *Describe* | *Limitations* |
+| -------- | ------------- | ------------ |
+| ROUND_ROBIN  | Within the transaction, read query are routed to the primary, 
and outside the transaction, the round-robin strategy is used to route to the 
replica | |
+| RANDOM    |Within the transaction, read query are routed to the primary, and 
outside the transaction, the random strategy is used to route to the replica| |
+| WEIGHT    | Within the transaction, read query are routed to the primary, 
and outside the transaction, the weight strategy is used to route to the 
replica| Attributes need to be configured, attribute name: ${replica-name}, 
data type: double, attribute name uses the name of the replica, and the 
parameter fills in the weight value corresponding to the replica. Weight 
parameter range min > 0, total <= Double.MAX_VALUE.|
+| TRANSACTION_RANDOM  |Display/non-display open transaction, read query are 
routed to multiple replicas using random strategy| |
+| TRANSACTION_ROUND_ROBIN  |Display/non-display open transaction, read query 
are routed to multiple replicas using round-robin strategy| |
+| TRANSACTION_WEIGHT  |Display/non-display open transaction, read query are 
routed to multiple replicas using weight strategy| Attributes need to be 
configured, attribute name: ${replica-name}, data type: double, attribute name 
uses the name of the replica, and the parameter fills in the weight value 
corresponding to the replica. Weight parameter range min > 0, total <= 
Double.MAX_VALUE.|
+| FIXED_REPLICA_RANDOM  |Open transaction displayed, and the read query is 
routed to a fixed replica using random strategy; otherwise, each read traffic 
is routed to a different replica using random strategy| |
+| FIXED_REPLICA_ROUND_ROBIN  |Open transaction displayed, and the read query 
is routed to a fixed replica using round-robin strategy; otherwise, each read 
traffic is routed to a different replica using round-robin strategy| |
+| FIXED_REPLICA_WEIGHT  |Open transaction displayed, and the read query is 
routed to a fixed replica using weight strategy; otherwise, each read traffic 
is routed to a different replica using weight strategy| Attributes need to be 
configured, attribute name: ${replica-name}, data type: double, attribute name 
uses the name of the replica, and the parameter fills in the weight value 
corresponding to the replica. Weight parameter range min > 0, total <= 
Double.MAX_VALUE. |
+| FIXED_PRIMARY  |All read query are routed to the primary|
 
 ## Procedure
 

Reply via email to