You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2021/03/12 07:52:07 UTC
[shardingsphere] branch master updated: modify read write splitting
doc (#9642)
This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 0a9c301 modify read write splitting doc (#9642)
0a9c301 is described below
commit 0a9c3015475be0e41d8a0c54f291fb51d0e8d1c6
Author: xiaoyu <54...@qq.com>
AuthorDate: Fri Mar 12 15:51:44 2021 +0800
modify read write splitting doc (#9642)
* modify read write splitting doc
* modify read write splitting doc
---
...lica-query.cn.md => read-write-splitting.cn.md} | 0
...lica-query.en.md => read-write-splitting.en.md} | 2 +-
.../_index.cn.md | 4 +-
.../_index.en.md | 4 +-
.../concept.cn.md | 0
.../concept.en.md | 0
.../use-norms.cn.md | 0
.../use-norms.en.md | 0
.../{replica-query.cn.md => change-history.cn.md} | 12 ++++--
.../{replica-query.en.md => change-history.en.md} | 12 ++++--
.../configuration/java-api/mix.cn.md | 40 +++++++++----------
.../configuration/java-api/mix.en.md | 44 ++++++++++-----------
...lica-query.cn.md => read-write-splitting.cn.md} | 12 +++---
...lica-query.en.md => read-write-splitting.en.md} | 16 ++++----
.../{replica-query.cn.md => change-history.cn.md} | 10 +++--
.../{replica-query.en.md => change-history.en.md} | 10 +++--
.../configuration/spring-boot-starter/mix.cn.md | 34 ++++++++--------
.../configuration/spring-boot-starter/mix.en.md | 42 ++++++++++----------
.../spring-boot-starter/read-write-splitting.cn.md | 20 ++++++++++
.../spring-boot-starter/read-write-splitting.en.md | 20 ++++++++++
.../{replica-query.cn.md => change-history.cn.md} | 6 ++-
.../{replica-query.en.md => change-history.en.md} | 8 +++-
.../configuration/spring-namespace/mix.cn.md | 34 ++++++++--------
.../configuration/spring-namespace/mix.en.md | 42 ++++++++++----------
...lica-query.cn.md => read-write-splitting.cn.md} | 12 +++---
...lica-query.en.md => read-write-splitting.en.md} | 18 ++++-----
.../{replica-query.cn.md => change-history.cn.md} | 10 +++--
.../{replica-query.en.md => change-history.en.md} | 10 +++--
.../configuration/yaml/mix.cn.md | 16 ++++----
.../configuration/yaml/mix.en.md | 16 ++++----
...ica-query.cn.md => read-write-splitting .cn.md} | 8 ++--
...lica-query.en.md => read-write-splitting.en.md} | 12 +++---
.../read-write-splitting-standalone.png} | Bin
.../sharding-and-read-write-splitting.png} | Bin
34 files changed, 273 insertions(+), 201 deletions(-)
diff --git a/docs/document/content/dev-manual/replica-query.cn.md b/docs/document/content/dev-manual/read-write-splitting.cn.md
similarity index 100%
rename from docs/document/content/dev-manual/replica-query.cn.md
rename to docs/document/content/dev-manual/read-write-splitting.cn.md
diff --git a/docs/document/content/dev-manual/replica-query.en.md b/docs/document/content/dev-manual/read-write-splitting.en.md
similarity index 96%
rename from docs/document/content/dev-manual/replica-query.en.md
rename to docs/document/content/dev-manual/read-write-splitting.en.md
index 5282fc3..78cd8c8 100644
--- a/docs/document/content/dev-manual/replica-query.en.md
+++ b/docs/document/content/dev-manual/read-write-splitting.en.md
@@ -1,6 +1,6 @@
+++
pre = "<b>5.5. </b>"
-title = "Replica Query"
+title = "Read write splitting"
weight = 5
chapter = true
+++
diff --git a/docs/document/content/features/replica-query/_index.cn.md b/docs/document/content/features/read-write-splitting/_index.cn.md
similarity index 93%
rename from docs/document/content/features/replica-query/_index.cn.md
rename to docs/document/content/features/read-write-splitting/_index.cn.md
index 559bfad..5265daf 100644
--- a/docs/document/content/features/replica-query/_index.cn.md
+++ b/docs/document/content/features/read-write-splitting/_index.cn.md
@@ -15,7 +15,7 @@ chapter = true
与将数据根据分片键打散至各个数据节点的水平分片不同,读写分离则是根据SQL语义的分析,将读操作和写操作分别路由至主库与从库。
-
+
读写分离的数据节点中的数据内容是一致的,而水平分片的每个数据节点的数据内容却并不相同。将水平分片和读写分离联合使用,能够更加有效的提升系统性能。
@@ -26,7 +26,7 @@ chapter = true
并且,读写分离也带来了与数据分片同样的问题,它同样会使得应用开发和运维人员对数据库的操作和运维变得更加复杂。
下图展现了将分库分表与读写分离一同使用时,应用程序与数据库集群之间的复杂拓扑关系。
-
+
## 目标
diff --git a/docs/document/content/features/replica-query/_index.en.md b/docs/document/content/features/read-write-splitting/_index.en.md
similarity index 88%
rename from docs/document/content/features/replica-query/_index.en.md
rename to docs/document/content/features/read-write-splitting/_index.en.md
index 4bf7455..24a57b7 100644
--- a/docs/document/content/features/replica-query/_index.en.md
+++ b/docs/document/content/features/read-write-splitting/_index.en.md
@@ -13,7 +13,7 @@ One primary database with multiple replica databases can further enhance system
Different from the horizontal sharding that separates data to all nodes according to sharding keys, replica query routes read operations and write operations separately to the primary database and the replica database according to SQL meaning analysis.
-
+
Data in replica query split nodes is consistent, whereas that in horizontal shards is not. The combined use of horizontal sharding and replica query will effectively enhance the system performance.
@@ -21,7 +21,7 @@ Data in replica query split nodes is consistent, whereas that in horizontal shar
Though replica query can enhance system throughput and availability, it also brings inconsistent data, including that between multiple primary databases and between primary databases and replica databases. What's more, it also brings the same problem as data sharding, complicating app developer and operator's maintenance and operation. The following picture has shown the complex topological relations between applications and database groups when sharding table and database used together [...]
-
+
## Goal
diff --git a/docs/document/content/features/replica-query/concept.cn.md b/docs/document/content/features/read-write-splitting/concept.cn.md
similarity index 100%
rename from docs/document/content/features/replica-query/concept.cn.md
rename to docs/document/content/features/read-write-splitting/concept.cn.md
diff --git a/docs/document/content/features/replica-query/concept.en.md b/docs/document/content/features/read-write-splitting/concept.en.md
similarity index 100%
rename from docs/document/content/features/replica-query/concept.en.md
rename to docs/document/content/features/read-write-splitting/concept.en.md
diff --git a/docs/document/content/features/replica-query/use-norms.cn.md b/docs/document/content/features/read-write-splitting/use-norms.cn.md
similarity index 100%
rename from docs/document/content/features/replica-query/use-norms.cn.md
rename to docs/document/content/features/read-write-splitting/use-norms.cn.md
diff --git a/docs/document/content/features/replica-query/use-norms.en.md b/docs/document/content/features/read-write-splitting/use-norms.en.md
similarity index 100%
rename from docs/document/content/features/replica-query/use-norms.en.md
rename to docs/document/content/features/read-write-splitting/use-norms.en.md
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/change-history.cn.md
similarity index 91%
copy from docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.cn.md
copy to docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/change-history.cn.md
index 739b529..0da76ad 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/change-history.cn.md
@@ -1,9 +1,13 @@
+++
-title = "读写分离"
-weight = 2
+title = "变更历史"
+weight = 7
+++
-## 配置入口
+# ShardingSphere-5.0.0-alpha
+
+## 读写分离
+
+### 配置入口
类名称:ReplicaQueryRuleConfiguration
@@ -14,7 +18,7 @@ weight = 2
| dataSources (+) | Collection\<ReplicaQueryDataSourceRuleConfiguration\> | 主从数据源配置 |
| loadBalancers (*) | Map\<String, ShardingSphereAlgorithmConfiguration\> | 从库负载均衡算法配置 |
-## 主从数据源配置
+### 主从数据源配置
类名称:ReplicaQueryDataSourceRuleConfiguration
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/change-history.en.md
similarity index 92%
copy from docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.en.md
copy to docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/change-history.en.md
index ef2f9b6..c77183f 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/change-history.en.md
@@ -1,9 +1,13 @@
+++
-title = "Replica Query"
-weight = 2
+title = "Change History"
+weight = 7
+++
-## Root Configuration
+# ShardingSphere-5.0.0-alpha
+
+## Replica Query
+
+### Root Configuration
Class name: ReplicaQueryRuleConfiguration
@@ -14,7 +18,7 @@ Attributes:
| dataSources (+) | Collection\<ReplicaQueryDataSourceRuleConfiguration\> | Data sources of primary and replicas |
| loadBalancers (*) | Map\<String, ShardingSphereAlgorithmConfiguration\> | Load balance algorithm name and configurations of replica data sources |
-## Replica Query Data Source Configuration
+### Replica Query Data Source Configuration
Class name: ReplicaQueryDataSourceRuleConfiguration
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.cn.md
index 93bd10f..af837b8 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.cn.md
@@ -12,36 +12,36 @@ weight = 6
```java
/* 数据源配置 */
-HikariDataSource primaryDataSource0 = new HikariDataSource();
-primaryDataSource0.setDriverClassName("com.mysql.jdbc.Driver");
-primaryDataSource0.setJdbcUrl("jdbc:mysql://localhost:3306/db0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8");
-primaryDataSource0.setUsername("root");
-primaryDataSource0.setPassword("");
+HikariDataSource writeDataSource0 = new HikariDataSource();
+writeDataSource0.setDriverClassName("com.mysql.jdbc.Driver");
+writeDataSource0.setJdbcUrl("jdbc:mysql://localhost:3306/db0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8");
+writeDataSource0.setUsername("root");
+writeDataSource0.setPassword("");
-HikariDataSource primaryDataSource1 = new HikariDataSource();
+HikariDataSource writeDataSource1 = new HikariDataSource();
// ...忽略其他数据库配置项
-HikariDataSource replica0OfPrimaryDataSource0 = new HikariDataSource();
+HikariDataSource read0OfwriteDataSource0 = new HikariDataSource();
// ...忽略其他数据库配置项
-HikariDataSource replica1OfPrimaryDataSource0 = new HikariDataSource();
+HikariDataSource read1OfwriteDataSource0 = new HikariDataSource();
// ...忽略其他数据库配置项
-HikariDataSource replica0OfPrimaryDataSource1 = new HikariDataSource();
+HikariDataSource read0OfwriteDataSource1 = new HikariDataSource();
// ...忽略其他数据库配置项
-HikariDataSource replica1OfPrimaryDataSource1 = new HikariDataSource();
+HikariDataSource read1OfwriteDataSource1 = new HikariDataSource();
// ...忽略其他数据库配置项
Map<String, DataSource> datasourceMaps = new HashMap<>(6);
-datasourceMaps.put("primary_ds0", primaryDataSource0);
-datasourceMaps.put("primary_ds0_replica0", replica0OfPrimaryDataSource0);
-datasourceMaps.put("primary_ds0_replica1", replica1OfPrimaryDataSource0);
+datasourceMaps.put("write_ds0", writeDataSource0);
+datasourceMaps.put("write_ds0_read0", read0OfwriteDataSource0);
+datasourceMaps.put("write_ds0_read1", read1OfwriteDataSource0);
-datasourceMaps.put("primary_ds1", primaryDataSource1);
-datasourceMaps.put("primary_ds1_replica0", replica0OfPrimaryDataSource1);
-datasourceMaps.put("primary_ds1_replica1", replica1OfPrimaryDataSource1);
+datasourceMaps.put("write_ds1", writeDataSource1);
+datasourceMaps.put("write_ds1_read0", read0OfwriteDataSource1);
+datasourceMaps.put("write_ds1_read1", read1OfwriteDataSource1);
/* 分片规则配置 */
// 表达式 ds_${0..1} 枚举值表示的是主从配置的逻辑数据源名称列表
@@ -87,14 +87,14 @@ encryptAlgorithmConfigs.put("pwd_encryptor", new ShardingSphereAlgorithmConfigur
EncryptRuleConfiguration encryptRuleConfiguration = new EncryptRuleConfiguration(Collections.singleton(encryptTableRuleConfig), encryptAlgorithmConfigs);
/* 读写分离规则配置 */
-ReplicaQueryDataSourceRuleConfiguration dataSourceConfiguration1 = new ReplicaQueryDataSourceRuleConfiguration("ds_0", "primary_ds0", Arrays.asList("primary_ds0_replica0", "primary_ds0_replica1"), "roundRobin");
-ReplicaQueryDataSourceRuleConfiguration dataSourceConfiguration2 = new ReplicaQueryDataSourceRuleConfiguration("ds_1", "primary_ds0", Arrays.asList("primary_ds1_replica0", "primary_ds1_replica0"), "roundRobin");
+ReadWriteSplittingDataSourceRuleConfiguration dataSourceConfiguration1 = new ReadWriteSplittingDataSourceRuleConfiguration("ds_0", "write_ds0", Arrays.asList("write_ds0_read0", "write_ds0_read1"), "roundRobin");
+ReadWriteSplittingDataSourceRuleConfiguration dataSourceConfiguration2 = new ReadWriteSplittingDataSourceRuleConfiguration("ds_1", "write_ds0", Arrays.asList("write_ds1_read0", "write_ds1_read0"), "roundRobin");
//负载均衡算法
Map<String, ShardingSphereAlgorithmConfiguration> loadBalanceMaps = new HashMap<>(1);
loadBalanceMaps.put("roundRobin", new ShardingSphereAlgorithmConfiguration("ROUND_ROBIN", new Properties()));
-ReplicaQueryRuleConfiguration replicaQueryRuleConfiguration = new ReplicaQueryRuleConfiguration(Arrays.asList(dataSourceConfiguration1, dataSourceConfiguration2), loadBalanceMaps);
+ReadWriteSplittingRuleConfiguration readWriteSplittingyRuleConfiguration = new ReadWriteSplittingRuleConfiguration(Arrays.asList(dataSourceConfiguration1, dataSourceConfiguration2), loadBalanceMaps);
/* 其他配置 */
Properties otherProperties = new Properties();
@@ -102,6 +102,6 @@ otherProperties.setProperty("sql-show", "true");
otherProperties.setProperty("query-with-cipher-column", "true");
/* shardingDataSource 就是最终被ORM框架或其他jdbc框架引用的数据源名称 */
-DataSource shardingDataSource = ShardingSphereDataSourceFactory.createDataSource(datasourceMaps, Arrays.asList(shardingRuleConfiguration, replicaQueryRuleConfiguration, encryptRuleConfiguration), otherProperties);
+DataSource shardingDataSource = ShardingSphereDataSourceFactory.createDataSource(datasourceMaps, Arrays.asList(shardingRuleConfiguration, readWriteSplittingyRuleConfiguration, encryptRuleConfiguration), otherProperties);
```
\ No newline at end of file
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.en.md
index 06abad8..9835d025 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/mix.en.md
@@ -7,39 +7,39 @@ weight = 6
```java
/* Data source configuration */
-HikariDataSource primaryDataSource0 = new HikariDataSource();
-primaryDataSource0.setDriverClassName("com.mysql.jdbc.Driver");
-primaryDataSource0.setJdbcUrl("jdbc:mysql://localhost:3306/db0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8");
-primaryDataSource0.setUsername("root");
-primaryDataSource0.setPassword("");
+HikariDataSource writeDataSource0 = new HikariDataSource();
+writeDataSource0.setDriverClassName("com.mysql.jdbc.Driver");
+writeDataSource0.setJdbcUrl("jdbc:mysql://localhost:3306/db0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8");
+writeDataSource0.setUsername("root");
+writeDataSource0.setPassword("");
-HikariDataSource primaryDataSource1 = new HikariDataSource();
+HikariDataSource writeDataSource1 = new HikariDataSource();
// ...Omit specific configuration.
-HikariDataSource replica0OfPrimaryDataSource0 = new HikariDataSource();
+HikariDataSource read0OfwriteDataSource0 = new HikariDataSource();
// ...Omit specific configuration.
-HikariDataSource replica1OfPrimaryDataSource0 = new HikariDataSource();
+HikariDataSource read1OfwriteDataSource0 = new HikariDataSource();
// ...Omit specific configuration.
-HikariDataSource replica0OfPrimaryDataSource1 = new HikariDataSource();
+HikariDataSource read0OfwriteDataSource1 = new HikariDataSource();
// ...Omit specific configuration.
-HikariDataSource replica1OfPrimaryDataSource1 = new HikariDataSource();
+HikariDataSource read1OfwriteDataSource1 = new HikariDataSource();
// ...Omit specific configuration.
Map<String, DataSource> datasourceMaps = new HashMap<>(6);
-datasourceMaps.put("primary_ds0", primaryDataSource0);
-datasourceMaps.put("primary_ds0_replica0", replica0OfPrimaryDataSource0);
-datasourceMaps.put("primary_ds0_replica1", replica1OfPrimaryDataSource0);
+datasourceMaps.put("write_ds0", writeDataSource0);
+datasourceMaps.put("write_ds0_read0", read0OfwriteDataSource0);
+datasourceMaps.put("write_ds0_read1", read1OfwriteDataSource0);
-datasourceMaps.put("primary_ds1", primaryDataSource1);
-datasourceMaps.put("primary_ds1_replica0", replica0OfPrimaryDataSource1);
-datasourceMaps.put("primary_ds1_replica1", replica1OfPrimaryDataSource1);
+datasourceMaps.put("write_ds1", writeDataSource1);
+datasourceMaps.put("write_ds1_read0", read0OfwriteDataSource1);
+datasourceMaps.put("write_ds1_read1", read1OfwriteDataSource1);
/* Sharding rule configuration */
-// The enumeration value of `ds_$->{0..1}` is the name of the logical data source configured with replica-query
+// The enumeration value of `ds_$->{0..1}` is the name of the logical data source configured with read-query
ShardingTableRuleConfiguration tOrderRuleConfiguration = new ShardingTableRuleConfiguration("t_order", "ds_${0..1}.t_order_${[0, 1]}");
tOrderRuleConfiguration.setKeyGenerateStrategy(new KeyGenerateStrategyConfiguration("order_id", "snowflake"));
tOrderRuleConfiguration.setTableShardingStrategy(new StandardShardingStrategyConfiguration("order_id", "tOrderInlineShardingAlgorithm"));
@@ -82,15 +82,15 @@ encryptAlgorithmConfigs.put("name_encryptor", new ShardingSphereAlgorithmConfigu
encryptAlgorithmConfigs.put("pwd_encryptor", new ShardingSphereAlgorithmConfiguration("assistedTest", encryptProperties));
EncryptRuleConfiguration encryptRuleConfiguration = new EncryptRuleConfiguration(Collections.singleton(encryptTableRuleConfig), encryptAlgorithmConfigs);
-/* Replica query rule configuration */
-ReplicaQueryDataSourceRuleConfiguration dataSourceConfiguration1 = new ReplicaQueryDataSourceRuleConfiguration("ds_0", "primary_ds0", Arrays.asList("primary_ds0_replica0", "primary_ds0_replica1"), "roundRobin");
-ReplicaQueryDataSourceRuleConfiguration dataSourceConfiguration2 = new ReplicaQueryDataSourceRuleConfiguration("ds_1", "primary_ds0", Arrays.asList("primary_ds1_replica0", "primary_ds1_replica0"), "roundRobin");
+/* Read write splitting rule configuration */
+ReadWriteSplittingDataSourceRuleConfiguration dataSourceConfiguration1 = new ReadWriteSplittingDataSourceRuleConfiguration("ds_0", "write_ds0", Arrays.asList("write_ds0_read0", "write_ds0_read1"), "roundRobin");
+ReadWriteSplittingDataSourceRuleConfiguration dataSourceConfiguration2 = new ReadWriteSplittingDataSourceRuleConfiguration("ds_1", "write_ds0", Arrays.asList("write_ds1_read0", "write_ds1_read0"), "roundRobin");
// Load balance algorithm configuration
Map<String, ShardingSphereAlgorithmConfiguration> loadBalanceMaps = new HashMap<>(1);
loadBalanceMaps.put("roundRobin", new ShardingSphereAlgorithmConfiguration("ROUND_ROBIN", new Properties()));
-ReplicaQueryRuleConfiguration replicaQueryRuleConfiguration = new ReplicaQueryRuleConfiguration(Arrays.asList(dataSourceConfiguration1, dataSourceConfiguration2), loadBalanceMaps);
+ReadWriteSplittingRuleConfiguration readWriteSplittingRuleConfiguration = new ReadWriteSplittingRuleConfiguration(Arrays.asList(dataSourceConfiguration1, dataSourceConfiguration2), loadBalanceMaps);
/* Other Properties configuration */
Properties otherProperties = new Properties();
@@ -98,6 +98,6 @@ otherProperties.setProperty("sql-show", "true");
otherProperties.setProperty("query-with-cipher-column", "true");
/* The variable `shardingDataSource` is the logic data source referenced by other frameworks(such as ORM, JPA, etc.) */
-DataSource shardingDataSource = ShardingSphereDataSourceFactory.createDataSource(datasourceMaps, Arrays.asList(shardingRuleConfiguration, replicaQueryRuleConfiguration, encryptRuleConfiguration), otherProperties);
+DataSource shardingDataSource = ShardingSphereDataSourceFactory.createDataSource(datasourceMaps, Arrays.asList(shardingRuleConfiguration, readWriteSplittingRuleConfiguration, encryptRuleConfiguration), otherProperties);
```
\ No newline at end of file
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/read-write-splitting.cn.md
similarity index 68%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.cn.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/read-write-splitting.cn.md
index 739b529..c06357e 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/read-write-splitting.cn.md
@@ -5,26 +5,26 @@ weight = 2
## 配置入口
-类名称:ReplicaQueryRuleConfiguration
+类名称:ReadWriteSplittingRuleConfiguration
可配置属性:
| *名称* | *数据类型* | *说明* |
| ----------------- | ----------------------------------------------------- | ----------------- |
-| dataSources (+) | Collection\<ReplicaQueryDataSourceRuleConfiguration\> | 主从数据源配置 |
+| dataSources (+) | Collection\<ReadWriteSplittingDataSourceRuleConfiguration\> | 读写数据源配置 |
| loadBalancers (*) | Map\<String, ShardingSphereAlgorithmConfiguration\> | 从库负载均衡算法配置 |
## 主从数据源配置
-类名称:ReplicaQueryDataSourceRuleConfiguration
+类名称:ReadWriteSplittingDataSourceRuleConfiguration
可配置属性:
| *名称* | *数据类型* | *说明* | *默认值* |
| -------------------------- | -------------------- | ------------------ | ------------- |
| name | String | 读写分离数据源名称 | - |
-| primaryDataSourceName | String | 主库数据源名称 | - |
-| replicaDataSourceNames (+) | Collection\<String\> | 从库数据源名称列表 | - |
-| loadBalancerName (?) | String | 从库负载均衡算法名称 | 轮询负载均衡算法 |
+| writeDataSourceName | String | 写库数据源名称 | - |
+| readDataSourceNames (+) | Collection\<String\> | 读库数据源名称列表 | - |
+| loadBalancerName (?) | String | 读库负载均衡算法名称 | 轮询负载均衡算法 |
算法类型的详情,请参见[内置负载均衡算法列表](/cn/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/load-balance)。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/read-write-splitting.en.md
similarity index 61%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.en.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/read-write-splitting.en.md
index ef2f9b6..c255766 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/replica-query.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/java-api/read-write-splitting.en.md
@@ -1,30 +1,30 @@
+++
-title = "Replica Query"
+title = "Read write splitting"
weight = 2
+++
## Root Configuration
-Class name: ReplicaQueryRuleConfiguration
+Class name: ReadWriteSplittingRuleConfiguration
Attributes:
| *Name* | *DataType* | *Description* |
| ----------------- | ----------------------------------------------------- | ---------------------------------------------------------------------- |
-| dataSources (+) | Collection\<ReplicaQueryDataSourceRuleConfiguration\> | Data sources of primary and replicas |
+| dataSources (+) | Collection\<ReadWriteSplittingDataSourceRuleConfiguration\> | Data sources of write and reads |
| loadBalancers (*) | Map\<String, ShardingSphereAlgorithmConfiguration\> | Load balance algorithm name and configurations of replica data sources |
-## Replica Query Data Source Configuration
+## Read write splitting Data Source Configuration
-Class name: ReplicaQueryDataSourceRuleConfiguration
+Class name: ReadWriteSplittingDataSourceRuleConfiguration
Attributes:
| *Name* | *DataType* | *Description* | *Default Value* |
| -------------------------- | -------------------- | ---------------------------------------------- | ---------------------------------- |
-| name | String | Replica query data source name | - |
-| primaryDataSourceName | String | Primary sources source name | - |
-| replicaDataSourceNames (+) | Collection\<String\> | Replica sources source name list | - |
+| name | String | Read write splitting data source name | - |
+| writeDataSourceName | String | Write sources source name | - |
+| readDataSourceNames (+) | Collection\<String\> | Read sources source name list | - |
| loadBalancerName (?) | String | Load balance algorithm name of replica sources | Round robin load balance algorithm |
Please refer to [Built-in Load Balance Algorithm List](/en/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/load-balance) for more details about type of algorithm.
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/replica-query.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/change-history.cn.md
similarity index 90%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/replica-query.cn.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/change-history.cn.md
index 9a35f6b..5d2d1e4 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/replica-query.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/change-history.cn.md
@@ -1,9 +1,13 @@
+++
-title = "读写分离"
-weight = 2
+title = "变更历史"
+weight = 7
+++
-## 配置项说明
+# ShardingSphere-5.0.0-alpha
+
+## 读写分离
+
+### 配置项说明
```properties
spring.shardingsphere.datasource.names= # 省略数据源配置,请参考使用手册
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/replica-query.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/change-history.en.md
similarity index 90%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/replica-query.en.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/change-history.en.md
index 1e38826..8db7d51 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/replica-query.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/change-history.en.md
@@ -1,9 +1,13 @@
+++
-title = "Replica Query"
-weight = 2
+title = "Change History"
+weight = 7
+++
-## Configuration Item Explanation
+# ShardingSphere-5.0.0-alpha
+
+## Replica Query
+
+### Configuration Item Explanation
```properties
spring.shardingsphere.datasource.names= # Omit the data source configuration, please refer to the usage
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.cn.md
index 7c2f6b1..d797767 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.cn.md
@@ -12,22 +12,22 @@ weight = 6
```properties
# 数据源配置
# 数据源名称,多数据源以逗号分隔
-spring.shardingsphere.datasource.names= primary-ds0,primary-ds1,primary-ds0-replica0,primary-ds1-replica0
+spring.shardingsphere.datasource.names= write-ds0,write-ds1,write-ds0-read0,write-ds1-read0
-spring.shardingsphere.datasource.primary-ds0.url= # 数据库 URL 连接
-spring.shardingsphere.datasource.primary-ds0.type= # 数据库连接池类名称
-spring.shardingsphere.datasource.primary-ds0.driver-class-name= # 数据库驱动类名
-spring.shardingsphere.datasource.primary-ds0.username= # 数据库用户名
-spring.shardingsphere.datasource.primary-ds0.password= # 数据库密码
-spring.shardingsphere.datasource.primary-ds0.xxx= # 数据库连接池的其它属性
+spring.shardingsphere.datasource.write-ds0.url= # 数据库 URL 连接
+spring.shardingsphere.datasource.write-ds0.type= # 数据库连接池类名称
+spring.shardingsphere.datasource.write-ds0.driver-class-name= # 数据库驱动类名
+spring.shardingsphere.datasource.write-ds0.username= # 数据库用户名
+spring.shardingsphere.datasource.write-ds0.password= # 数据库密码
+spring.shardingsphere.datasource.write-ds0.xxx= # 数据库连接池的其它属性
-spring.shardingsphere.datasource.primary-ds1.url= # 数据库 URL 连接
+spring.shardingsphere.datasource.write-ds1.url= # 数据库 URL 连接
... 忽略其他数据库配置项
-spring.shardingsphere.datasource.primary-ds0-replica0.url= # 数据库 URL 连接
+spring.shardingsphere.datasource.write-ds0-read0.url= # 数据库 URL 连接
... 忽略其他数据库配置项
-spring.shardingsphere.datasource.primary-ds1-replica0.url= # 数据库 URL 连接
+spring.shardingsphere.datasource.write-ds1-read0.url= # 数据库 URL 连接
... 忽略其他数据库配置项
# 分片规则配置
@@ -84,13 +84,13 @@ spring.shardingsphere.rules.sharding.key-generators.snowflake.props.worker-id=12
# 读写分离策略配置
# ds_0,ds_1为读写分离配置的逻辑数据源名称
-spring.shardingsphere.rules.replica-query.data-sources.ds_0.primary-data-source-name=primary-ds0
-spring.shardingsphere.rules.replica-query.data-sources.ds_0.replica-data-source-names=primary-ds0-replica0
-spring.shardingsphere.rules.replica-query.data-sources.ds_0.load-balancer-name=replica-random
-spring.shardingsphere.rules.replica-query.data-sources.ds_1.primary-data-source-name=primary-ds1
-spring.shardingsphere.rules.replica-query.data-sources.ds_1.replica-data-source-names=primary-ds1-replica0
-spring.shardingsphere.rules.replica-query.data-sources.ds_1.load-balancer-name=replica-random
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_0.write-data-source-name=write-ds0
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_0.read-data-source-names=write-ds0-read0
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_0.load-balancer-name=read-random
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_1.write-data-source-name=write-ds1
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_1.read-data-source-names=write-ds1-read0
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_1.load-balancer-name=read-random
# 负载均衡算法配置
-spring.shardingsphere.rules.replica-query.load-balancers.replica-random.type=RANDOM
+spring.shardingsphere.rules.read-write-splitting.load-balancers.read-random.type=RANDOM
```
\ No newline at end of file
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.en.md
index b2c8067..aba6369 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/mix.en.md
@@ -6,22 +6,22 @@ weight = 6
## Configuration Item Explanation
```properties
# data source configuration
-spring.shardingsphere.datasource.names= primary-ds0,primary-ds1,primary-ds0-replica0,primary-ds1-replica0
+spring.shardingsphere.datasource.names= write-ds0,write-ds1,write-ds0-read0,write-ds1-read0
-spring.shardingsphere.datasource.primary-ds0.url= # Database URL connection
-spring.shardingsphere.datasource.primary-ds0.type= # Database connection pool type name
-spring.shardingsphere.datasource.primary-ds0.driver-class-name= # Database driver class name
-spring.shardingsphere.datasource.primary-ds0.username= # Database username
-spring.shardingsphere.datasource.primary-ds0.password= # Database password
-spring.shardingsphere.datasource.primary-ds0.xxx= # Other properties of database connection pool
+spring.shardingsphere.datasource.write-ds0.url= # Database URL connection
+spring.shardingsphere.datasource.write-ds0.type= # Database connection pool type name
+spring.shardingsphere.datasource.write-ds0.driver-class-name= # Database driver class name
+spring.shardingsphere.datasource.write-ds0.username= # Database username
+spring.shardingsphere.datasource.write-ds0.password= # Database password
+spring.shardingsphere.datasource.write-ds0.xxx= # Other properties of database connection pool
-spring.shardingsphere.datasource.primary-ds1.url= # Database URL connection
+spring.shardingsphere.datasource.write-ds1.url= # Database URL connection
# ...Omit specific configuration.
-spring.shardingsphere.datasource.primary-ds0-replica0.url= # Database URL connection
+spring.shardingsphere.datasource.write-ds0-read0.url= # Database URL connection
# ...Omit specific configuration.
-spring.shardingsphere.datasource.primary-ds1-replica0.url= # Database URL connection
+spring.shardingsphere.datasource.write-ds1-read0.url= # Database URL connection
# ...Omit specific configuration.
# Sharding rules configuration
@@ -36,7 +36,7 @@ spring.shardingsphere.rules.sharding.binding-tables[x]= # Binding table names,mu
spring.shardingsphere.rules.sharding.broadcast-tables= # Broadcast table names,multiple table name are separated by commas
# Table sharding strategy
-# The enumeration value of `ds_$->{0..1}` is the name of the logical data source configured with replica-query
+# The enumeration value of `ds_$->{0..1}` is the name of the logical data source configured with read-write-splitting
spring.shardingsphere.rules.sharding.tables.t_user.actual-data-nodes=ds_$->{0..1}.t_user_$->{0..1}
spring.shardingsphere.rules.sharding.tables.t_user.table-strategy.standard.sharding-column=user_id
spring.shardingsphere.rules.sharding.tables.t_user.table-strategy.standard.sharding-algorithm-name=user-table-strategy-inline
@@ -60,7 +60,7 @@ spring.shardingsphere.rules.sharding.tables.t_user.key-generate-strategy.key-gen
# Sharding algorithm configuration
spring.shardingsphere.rules.sharding.sharding-algorithms.default-database-strategy-inline.type=INLINE
-# The enumeration value of `ds_$->{user_id % 2}` is the name of the logical data source configured with replica-query
+# The enumeration value of `ds_$->{user_id % 2}` is the name of the logical data source configured with read-write-splitting
spring.shardingsphere.rules.sharding.sharding-algorithms.default-database-strategy-inline.algorithm-expression=ds$->{user_id % 2}
spring.shardingsphere.rules.sharding.sharding-algorithms.user-table-strategy-inline.type=INLINE
spring.shardingsphere.rules.sharding.sharding-algorithms.user-table-strategy-inline.algorithm-expression=t_user_$->{user_id % 2}
@@ -69,15 +69,15 @@ spring.shardingsphere.rules.sharding.sharding-algorithms.user-table-strategy-inl
spring.shardingsphere.rules.sharding.key-generators.snowflake.type=SNOWFLAKE
spring.shardingsphere.rules.sharding.key-generators.snowflake.props.worker-id=123
-# Replica query configuration
-# ds_0,ds_1 is the logical data source name of the replica-query
-spring.shardingsphere.rules.replica-query.data-sources.ds_0.primary-data-source-name=primary-ds0
-spring.shardingsphere.rules.replica-query.data-sources.ds_0.replica-data-source-names=primary-ds0-replica0
-spring.shardingsphere.rules.replica-query.data-sources.ds_0.load-balancer-name=replica-random
-spring.shardingsphere.rules.replica-query.data-sources.ds_1.primary-data-source-name=primary-ds1
-spring.shardingsphere.rules.replica-query.data-sources.ds_1.replica-data-source-names=primary-ds1-replica0
-spring.shardingsphere.rules.replica-query.data-sources.ds_1.load-balancer-name=replica-random
+# read query configuration
+# ds_0,ds_1 is the logical data source name of the read-write-splitting
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_0.write-data-source-name=write-ds0
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_0.read-data-source-names=write-ds0-read0
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_0.load-balancer-name=read-random
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_1.write-data-source-name=write-ds1
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_1.read-data-source-names=write-ds1-read0
+spring.shardingsphere.rules.read-write-splitting.data-sources.ds_1.load-balancer-name=read-random
# Load balance algorithm configuration
-spring.shardingsphere.rules.replica-query.load-balancers.replica-random.type=RANDOM
+spring.shardingsphere.rules.read-write-splitting.load-balancers.read-random.type=RANDOM
```
\ No newline at end of file
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/read-write-splitting.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/read-write-splitting.cn.md
new file mode 100644
index 0000000..3d5b1e2
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/read-write-splitting.cn.md
@@ -0,0 +1,20 @@
++++
+title = "读写分离"
+weight = 2
++++
+
+## 配置项说明
+
+```properties
+spring.shardingsphere.datasource.names= # 省略数据源配置,请参考使用手册
+
+spring.shardingsphere.rules.read-write-splitting.data-sources.<read-write-splitting-data-source-name>.write-data-source-name= # 写数据源名称
+spring.shardingsphere.rules.read-write-splitting.data-sources.<read-write-splitting-data-source-name>.read-data-source-names= # 读数据源名称,多个从数据源用逗号分隔
+spring.shardingsphere.rules.read-write-splitting.data-sources.<read-write-splitting-data-source-name>.load-balancer-name= # 负载均衡算法名称
+
+# 负载均衡算法配置
+spring.shardingsphere.rules.read-write-splitting.load-balancers.<load-balance-algorithm-name>.type= # 负载均衡算法类型
+spring.shardingsphere.rules.read-write-splitting.load-balancers.<load-balance-algorithm-name>.props.xxx= # 负载均衡算法属性配置
+```
+
+算法类型的详情,请参见[内置负载均衡算法列表](/cn/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/load-balance)。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/read-write-splitting.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/read-write-splitting.en.md
new file mode 100644
index 0000000..e7015b2
--- /dev/null
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-boot-starter/read-write-splitting.en.md
@@ -0,0 +1,20 @@
++++
+title = "Read write splitting"
+weight = 2
++++
+
+## Configuration Item Explanation
+
+```properties
+spring.shardingsphere.datasource.names= # Omit the data source configuration, please refer to the usage
+
+spring.shardingsphere.rules.read-write-splitting.data-sources.<read-write-splitting-data-source-name>.primary-data-source-name= # Write data source name
+spring.shardingsphere.rules.read-write-splitting.data-sources.<read-write-splitting-data-source-name>.replica-data-source-names= # Read data source names, multiple data source names separated with comma
+spring.shardingsphere.rules.read-write-splitting.data-sources.<read-write-splitting-data-source-name>.load-balancer-name= # Load balance algorithm name
+
+# Load balance algorithm configuration
+spring.shardingsphere.rules.read-write-splitting.load-balancers.<load-balance-algorithm-name>.type= # Load balance algorithm type
+spring.shardingsphere.rules.read-write-splitting.load-balancers.<load-balance-algorithm-name>.props.xxx= # Load balance algorithm properties
+```
+
+Please refer to [Built-in Load Balance Algorithm List](/en/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/load-balance) for more details about type of algorithm.
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/change-history.cn.md
similarity index 96%
copy from docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.cn.md
copy to docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/change-history.cn.md
index 5c82ae1..8a2454a 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/change-history.cn.md
@@ -1,8 +1,12 @@
+++
title = "读写分离"
-weight = 2
+weight = 7
+++
+# ShardingSphere-5.0.0-alpha
+
+## 读写分离
+
## 配置项说明
命名空间:[http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd](http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd)
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/change-history.en.md
similarity index 95%
copy from docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.en.md
copy to docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/change-history.en.md
index 89fc775..3bb1136 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/change-history.en.md
@@ -1,8 +1,12 @@
+++
-title = "Replica Query"
-weight = 2
+title = "Change History"
+weight = 7
+++
+# ShardingSphere-5.0.0-alpha
+
+## Replica Query
+
## Configuration Item Explanation
Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd](http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd)
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.cn.md
index 7c28258..f38ac77 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.cn.md
@@ -15,7 +15,7 @@ weight = 6
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:shardingsphere="http://shardingsphere.apache.org/schema/shardingsphere/datasource"
- xmlns:replica-query="http://shardingsphere.apache.org/schema/shardingsphere/replica-query"
+ xmlns:read-write-splitting="http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting"
xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
@@ -25,47 +25,47 @@ weight = 6
http://www.springframework.org/schema/tx/spring-tx.xsd
http://shardingsphere.apache.org/schema/shardingsphere/datasource
http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
- http://shardingsphere.apache.org/schema/shardingsphere/replica-query
- http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query.xsd
+ http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting
+ http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting/read-write-splitting.xsd
http://shardingsphere.apache.org/schema/shardingsphere/encrypt
http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
">
- <bean id="primary_ds0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="write_ds0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/primary_ds?useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
+ <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/write_ds?useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
<property name="username" value="root" />
<property name="password" value="" />
</bean>
- <bean id="replica_ds0_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds0_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 省略详细数据源配置详情 -->
</bean>
- <bean id="replica_ds0_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds0_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 省略详细数据源配置详情 -->
</bean>
- <bean id="primary_ds1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="write_ds1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 省略详细数据源配置详情 -->
</bean>
- <bean id="replica_ds1_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds1_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 省略详细数据源配置详情 -->
</bean>
- <bean id="replica_ds1_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds1_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 省略详细数据源配置详情 -->
</bean>
<!-- 主从配置负载均衡策略 -->
- <replica-query:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+ <read-write-splitting:load-balance-algorithm id="randomStrategy" type="RANDOM" />
<!-- 主从规则配置 -->
- <replica-query:rule id="replicaQueryRuleDs0">
- <replica-query:data-source-rule id="ds_0" primary-data-source-name="primary_ds0" replica-data-source-names="replica_ds0_0, replica_ds0_1" load-balance-algorithm-ref="randomStrategy" />
- <replica-query:data-source-rule id="ds_1" primary-data-source-name="primary_ds1" replica-data-source-names="replica_ds1_0, replica_ds1_1" load-balance-algorithm-ref="randomStrategy" />
- </replica-query:rule>
+ <read-write-splitting:rule id="readWriteSplittingRule">
+ <read-write-splitting:data-source-rule id="ds_0" write-data-source-name="write_ds0" read-data-source-names="read_ds0_0, read_ds0_1" load-balance-algorithm-ref="randomStrategy" />
+ <read-write-splitting:data-source-rule id="ds_1" write-data-source-name="write_ds1" read-data-source-names="read_ds1_0, read_ds1_1" load-balance-algorithm-ref="randomStrategy" />
+ </read-write-splitting:rule>
<!-- 分片策略配置 -->
<sharding:standard-strategy id="databaseStrategy" sharding-column="user_id" algorithm-ref="inlineDatabaseStrategyAlgorithm" />
@@ -121,8 +121,8 @@ weight = 6
<!-- 数据源配置 -->
<!-- data-source-names 数据源名称为所有的数据源节点名称 -->
- <shardingsphere:data-source id="replicaQueryDataSource" data-source-names="primary_ds0, replica_ds0_0, replica_ds0_1, primary_ds1, replica_ds1_0, replica_ds1_1"
- rule-refs="replicaQueryRule, shardingRule, encryptRule" >
+ <shardingsphere:data-source id="readQueryDataSource" data-source-names="write_ds0, read_ds0_0, read_ds0_1, write_ds1, read_ds1_0, read_ds1_1"
+ rule-refs="readWriteSplittingRule, shardingRule, encryptRule" >
<props>
<prop key="query-with-cipher-column">true</prop>
<prop key="sql-show">true</prop>
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.en.md
index eb509a5..30d29ff 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/mix.en.md
@@ -10,7 +10,7 @@ weight = 6
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:shardingsphere="http://shardingsphere.apache.org/schema/shardingsphere/datasource"
- xmlns:replica-query="http://shardingsphere.apache.org/schema/shardingsphere/replica-query"
+ xmlns:read-write-splitting="http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting"
xmlns:encrypt="http://shardingsphere.apache.org/schema/shardingsphere/encrypt"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
@@ -20,47 +20,47 @@ weight = 6
http://www.springframework.org/schema/tx/spring-tx.xsd
http://shardingsphere.apache.org/schema/shardingsphere/datasource
http://shardingsphere.apache.org/schema/shardingsphere/datasource/datasource.xsd
- http://shardingsphere.apache.org/schema/shardingsphere/replica-query
- http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query.xsd
+ http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting
+ http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting/read-write-splitting.xsd
http://shardingsphere.apache.org/schema/shardingsphere/encrypt
http://shardingsphere.apache.org/schema/shardingsphere/encrypt/encrypt.xsd
">
- <bean id="primary_ds0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="write_ds0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/primary_ds?useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
+ <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/write_ds?useSSL=false&useUnicode=true&characterEncoding=UTF-8" />
<property name="username" value="root" />
<property name="password" value="" />
</bean>
- <bean id="replica_ds0_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds0_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- ...Omit specific configuration. -->
</bean>
- <bean id="replica_ds0_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds0_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- ...Omit specific configuration. -->
</bean>
- <bean id="primary_ds1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="write_ds1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- ...Omit specific configuration. -->
</bean>
- <bean id="replica_ds1_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds1_0" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- ...Omit specific configuration. -->
</bean>
- <bean id="replica_ds1_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
+ <bean id="read_ds1_1" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- ...Omit specific configuration. -->
</bean>
- <!-- load balance algorithm configuration for replica-query -->
- <replica-query:load-balance-algorithm id="randomStrategy" type="RANDOM" />
+ <!-- load balance algorithm configuration for read-write-splitting -->
+ <read-write-splitting:load-balance-algorithm id="randomStrategy" type="RANDOM" />
- <!-- replica-query rule configuration -->
- <replica-query:rule id="replicaQueryRuleDs0">
- <replica-query:data-source-rule id="ds_0" primary-data-source-name="primary_ds0" replica-data-source-names="replica_ds0_0, replica_ds0_1" load-balance-algorithm-ref="randomStrategy" />
- <replica-query:data-source-rule id="ds_1" primary-data-source-name="primary_ds1" replica-data-source-names="replica_ds1_0, replica_ds1_1" load-balance-algorithm-ref="randomStrategy" />
- </replica-query:rule>
+ <!-- read-write-splitting rule configuration -->
+ <read-write-splitting:rule id="readWriteSplittingRule">
+ <read-write-splitting:data-source-rule id="ds_0" write-data-source-name="write_ds0" read-data-source-names="read_ds0_0, read_ds0_1" load-balance-algorithm-ref="randomStrategy" />
+ <read-write-splitting:data-source-rule id="ds_1" write-data-source-name="write_ds1" read-data-source-names="read_ds1_0, read_ds1_1" load-balance-algorithm-ref="randomStrategy" />
+ </read-write-splitting:rule>
<!-- sharding strategy configuration -->
<sharding:standard-strategy id="databaseStrategy" sharding-column="user_id" algorithm-ref="inlineDatabaseStrategyAlgorithm" />
@@ -69,7 +69,7 @@ weight = 6
<sharding:sharding-algorithm id="inlineDatabaseStrategyAlgorithm" type="INLINE">
<props>
- <!-- the expression enumeration is the logical data source name of the replica-query configuration -->
+ <!-- the expression enumeration is the logical data source name of the read-write-splitting configuration -->
<prop key="algorithm-expression">ds_${user_id % 2}</prop>
</props>
</sharding:sharding-algorithm>
@@ -87,7 +87,7 @@ weight = 6
<!-- sharding rule configuration -->
<sharding:rule id="shardingRule">
<sharding:table-rules>
- <!-- the expression 'ds_${0..1}' enumeration is the logical data source name of the replica-query configuration -->
+ <!-- the expression 'ds_${0..1}' enumeration is the logical data source name of the read-write-splitting configuration -->
<sharding:table-rule logic-table="t_order" actual-data-nodes="ds_${0..1}.t_order_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderTableStrategy" key-generate-strategy-ref="orderKeyGenerator"/>
<sharding:table-rule logic-table="t_order_item" actual-data-nodes="ds_${0..1}.t_order_item_${0..1}" database-strategy-ref="databaseStrategy" table-strategy-ref="orderItemTableStrategy" key-generate-strategy-ref="itemKeyGenerator"/>
</sharding:table-rules>
@@ -116,8 +116,8 @@ weight = 6
<!-- datasource configuration -->
<!-- the element data-source-names's value is all of the datasource name -->
- <shardingsphere:data-source id="replicaQueryDataSource" data-source-names="primary_ds0, replica_ds0_0, replica_ds0_1, primary_ds1, replica_ds1_0, replica_ds1_1"
- rule-refs="replicaQueryRule, shardingRule, encryptRule" >
+ <shardingsphere:data-source id="readQueryDataSource" data-source-names="write_ds0, read_ds0_0, read_ds0_1, write_ds1, read_ds1_0, read_ds1_1"
+ rule-refs="readWriteSplittingRule, shardingRule, encryptRule" >
<props>
<prop key="query-with-cipher-column">true</prop>
<prop key="sql-show">true</prop>
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/read-write-splitting.cn.md
similarity index 71%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.cn.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/read-write-splitting.cn.md
index 5c82ae1..537dc03 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/read-write-splitting.cn.md
@@ -5,26 +5,26 @@ weight = 2
## 配置项说明
-命名空间:[http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd](http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd)
+命名空间:[http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting/read-write-splitting-5.0.0.xsd](http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting/read-write-splitting-5.0.0.xsd)
-\<replica-query:rule />
+\<read-write-splitting:rule />
| *名称* | *类型* | *说明* |
| -------------------- | ------ | --------------- |
| id | 属性 | Spring Bean Id |
| data-source-rule (+) | 标签 | 读写分离数据源规则配置 |
-\<replica-query:data-source-rule />
+\<read-write-splitting:data-source-rule />
| *名称* | *类型* | *说明* |
| -------------------------- | ----- | ------------------------------- |
| id | 属性 | 读写分离数据源规则名称 |
-| primary-data-source-name | 属性 | 主数据源名称 |
-| replica-data-source-names | 属性 | 从数据源名称,多个从数据源用逗号分隔 |
+| write-data-source-name | 属性 | 写数据源名称 |
+| read-data-source-names | 属性 | 读数据源名称,多个读数据源用逗号分隔 |
| load-balance-algorithm-ref | 属性 | 负载均衡算法名称 |
-\<replica-query:load-balance-algorithm />
+\<read-write-splitting:load-balance-algorithm />
| *名称* | *类型* | *说明* |
| --------- | ----- | ----------------- |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/read-write-splitting.en.md
similarity index 61%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.en.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/read-write-splitting.en.md
index 89fc775..21a6865 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/replica-query.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/spring-namespace/read-write-splitting.en.md
@@ -1,29 +1,29 @@
+++
-title = "Replica Query"
+title = "Read write splitting"
weight = 2
+++
## Configuration Item Explanation
-Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd](http://shardingsphere.apache.org/schema/shardingsphere/replica-query/replica-query-5.0.0.xsd)
+Namespace: [http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting/read-write-splitting-5.0.0.xsd](http://shardingsphere.apache.org/schema/shardingsphere/read-write-splitting/read-write-splitting-5.0.0.xsd)
-\<replica-query:rule />
+\<read-write-splitting:rule />
| *Name* | *Type* | *Description* |
| -------------------- | --------- | -------------------------------------------- |
| id | Attribute | Spring Bean Id |
-| data-source-rule (+) | Tag | Replica query data source rule configuration |
+| data-source-rule (+) | Tag | Read write splitting data source rule configuration |
-\<replica-query:data-source-rule />
+\<read-write-splitting:data-source-rule />
| *Name* | *Type* | *Description* |
| -------------------------- | ---------- | -------------------------------------------------------------------------- |
-| id | Attribute | Primary-replica data source rule name |
-| primary-data-source-name | Attribute | Primary data source name |
-| replica-data-source-names | Attribute | Replica data source names, multiple data source names separated with comma |
+| id | Attribute | Read write splitting data source rule name |
+| write-data-source-name | Attribute | Write data source name |
+| read-data-source-names | Attribute | Read data source names, multiple data source names separated with comma |
| load-balance-algorithm-ref | Attribute | Load balance algorithm name |
-\<replica-query:load-balance-algorithm />
+\<read-write-splitting:load-balance-algorithm />
| *Name* | *Type* | *Description* |
| --------- | ---------- | --------------------------------- |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/change-history.cn.md
similarity index 88%
copy from docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.cn.md
copy to docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/change-history.cn.md
index b32a01f..8056bce 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/change-history.cn.md
@@ -1,9 +1,13 @@
+++
-title = "读写分离"
-weight = 2
+title = "变更历史"
+weight = 7
+++
-## 配置项说明
+# ShardingSphere-5.0.0-alpha
+
+## 读写分离
+
+### 配置项说明
```yaml
dataSources: # 省略数据源配置,请参考使用手册
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/change-history.en.md
similarity index 87%
copy from docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.en.md
copy to docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/change-history.en.md
index e644aa2..556fc88 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/change-history.en.md
@@ -1,9 +1,13 @@
+++
-title = "Replica Query"
-weight = 2
+title = "Change History"
+weight = 7
+++
-## Configuration Item Explanation
+# ShardingSphere-5.0.0-alpha
+
+## Replica Query
+
+### Configuration Item Explanation
```yaml
dataSource: # Omit the data source configuration, please refer to the usage
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
index 9d8447a..8619d83 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
@@ -12,11 +12,11 @@ weight = 6
```yml
dataSources: # 配置真实存在的数据源作为名称
- primary_ds:
+ write_ds:
# ...省略具体配置
- replica_ds_0:
+ read_ds_0:
# ...省略具体配置
- replica_ds_0:
+ read_ds_0:
# ...省略具体配置
rules:
@@ -48,14 +48,14 @@ rules:
props:
aes-key-value: 123456abc
- - !REPLICA_QUERY # 配置读写分离规则
+ - !READ_WRITE_SPLITTING # 配置读写分离规则
dataSources:
ds:
name: ds # 读写分离的逻辑数据源名称 `ds` 用于在数据分片中使用
- primaryDataSourceName: primary_ds # 使用真实存在的数据源名称 `primary_ds`
- replicaDataSourceNames:
- - replica_ds_0 # 使用真实存在的数据源名称 `replica_ds_0`
- - replica_ds_1 # 使用真实存在的数据源名称 `replica_ds_1`
+ writeDataSourceName: write_ds # 使用真实存在的数据源名称 `write_ds`
+ readDataSourceNames:
+ - read_ds_0 # 使用真实存在的数据源名称 `read_ds_0`
+ - read_ds_1 # 使用真实存在的数据源名称 `read_ds_1`
loadBalancerName: roundRobin
loadBalancers:
roundRobin:
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
index 0c73a5b..2a25616 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
@@ -13,11 +13,11 @@ Similarly, if the previous rule is table aggregation-oriented, the next rule nee
```yml
dataSources: # Configure the real data source name.
- primary_ds:
+ write_ds:
# ...Omit specific configuration.
- replica_ds_0:
+ read_ds_0:
# ...Omit specific configuration.
- replica_ds_0:
+ read_ds_0:
# ...Omit specific configuration.
rules:
@@ -49,14 +49,14 @@ rules:
props:
aes-key-value: 123456abc
- - !REPLICA_QUERY # Configure read-write separation rules.
+ - !READ_WRITE_SPLITTING # Configure read-write separation rules.
dataSources:
ds:
name: ds # The logical data source name 'ds' for read-write separation is used in data sharding.
- primaryDataSourceName: primary_ds # Use the real data source name 'primary_ds'.
- replicaDataSourceNames:
- - replica_ds_0 # Use the real data source name 'replica_ds_0'.
- - replica_ds_1 # Use the real data source name 'replica_ds_1'.
+ writeDataSourceName: write_ds # Use the real data source name 'write_ds'.
+ readDataSourceNames:
+ - read_ds_0 # Use the real data source name 'read_ds_0'.
+ - read_ds_1 # Use the real data source name 'read_ds_1'.
loadBalancerName: roundRobin
loadBalancers:
roundRobin:
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-splitting .cn.md
similarity index 79%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.cn.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-splitting .cn.md
index b32a01f..04d8c6b 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-splitting .cn.md
@@ -9,12 +9,12 @@ weight = 2
dataSources: # 省略数据源配置,请参考使用手册
rules:
-- !REPLICA_QUERY
+- !READ_WRITE_SPLITTING
dataSources:
<data-source-name> (+): # 读写分离逻辑数据源名称
- primaryDataSourceName: # 主库数据源名称
- replicaDataSourceNames:
- - <replica-data_source-name> (+) # 从库数据源名称
+ writeDataSourceName: # 写库数据源名称
+ readDataSourceNames:
+ - <read-data_source-name> (+) # 写库数据源名称
loadBalancerName: # 负载均衡算法名称
# 负载均衡算法配置
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-splitting.en.md
similarity index 70%
rename from docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.en.md
rename to docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-splitting.en.md
index e644aa2..39b7fe4 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/replica-query.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-splitting.en.md
@@ -1,5 +1,5 @@
+++
-title = "Replica Query"
+title = "Read write splitting"
weight = 2
+++
@@ -9,12 +9,12 @@ weight = 2
dataSource: # Omit the data source configuration, please refer to the usage
rules:
-- !REPLICA_QUERY
+- !READ_WRITE_SPLITTING
dataSources:
- <data-source-name> (+): # Logic data source name of replica query
- primaryDataSourceName: # Primary data source name
- replicaDataSourceNames:
- - <replica-data-source-name> (+) # Replica data source name
+ <data-source-name> (+): # Logic data source name of read write splitting
+ writeDataSourceName: # Write data source name
+ readDataSourceNames:
+ - <read-data-source-name> (+) # Read data source name
loadBalancerName: # Load balance algorithm name
# Load balance algorithm configuration
diff --git a/docs/document/static/img/replica-query/replica-query-standalone.png b/docs/document/static/img/read-write-splitting/read-write-splitting-standalone.png
similarity index 100%
rename from docs/document/static/img/replica-query/replica-query-standalone.png
rename to docs/document/static/img/read-write-splitting/read-write-splitting-standalone.png
diff --git a/docs/document/static/img/replica-query/sharding-and-replica-query.png b/docs/document/static/img/read-write-splitting/sharding-and-read-write-splitting.png
similarity index 100%
rename from docs/document/static/img/replica-query/sharding-and-replica-query.png
rename to docs/document/static/img/read-write-splitting/sharding-and-read-write-splitting.png