You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2021/11/25 15:01:46 UTC
[shardingsphere] branch master updated: Update change history of ShardingSphere-Proxy. (#13799)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao 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 1d2cb80 Update change history of ShardingSphere-Proxy. (#13799)
1d2cb80 is described below
commit 1d2cb80c098c400fe77bcf25627a2b50702c7f16
Author: yx9o <ya...@163.com>
AuthorDate: Thu Nov 25 22:58:13 2021 +0800
Update change history of ShardingSphere-Proxy. (#13799)
* Update change history of ShardingSphere-Proxy.
* Update version
---
.../shardingsphere-proxy/_index.cn.md | 56 ++++++++++++++++++++++
.../shardingsphere-proxy/_index.en.md | 56 ++++++++++++++++++++++
2 files changed, 112 insertions(+)
diff --git a/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.cn.md b/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.cn.md
index 4ef98ea..58004c4 100644
--- a/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.cn.md
+++ b/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.cn.md
@@ -4,6 +4,62 @@ weight = 1
chapter = true
+++
+## 5.0.0-beta
+
+### 数据源配置项说明
+
+```yaml
+schemaName: # 逻辑数据源名称
+
+dataSources: # 数据源配置,可配置多个 <data-source-name>
+ <data-source-name>: # 与 ShardingSphere-JDBC 配置不同,无需配置数据库连接池
+ url: #数据库 URL 连接
+ username: # 数据库用户名
+ password: # 数据库密码
+ connectionTimeoutMilliseconds: # 连接超时毫秒数
+ idleTimeoutMilliseconds: # 空闲连接回收超时毫秒数
+ maxLifetimeMilliseconds: # 连接最大存活时间毫秒数
+ maxPoolSize: 50 # 最大连接数
+ minPoolSize: 1 # 最小连接数
+
+rules: # 与 ShardingSphere-JDBC 配置一致
+ # ...
+```
+
+### 权限配置
+
+用于执行登录 Sharding Proxy 的权限验证。 配置用户名、密码、可访问的数据库后,必须使用正确的用户名、密码才可登录。
+
+```yaml
+rules:
+ - !AUTHORITY
+ users:
+ - root@localhost:root # <username>@<hostname>:<password>,hostname 为 % 或空字符串,则代表不限制 host。
+ - sharding@:sharding
+ provider:
+ type: NATIVE # 必须显式指定
+```
+
+hostname 为 % 或空字符串,则代表不限制 host。
+
+provider 的 type 必须显式指定,具体实现可以参考 [5.11 Proxy](https://shardingsphere.apache.org/document/5.0.0-beta/cn/dev-manual/proxy/)
+
+### Proxy 属性
+
+```yaml
+props:
+ sql-show: # 是否在日志中打印 SQL。打印 SQL 可以帮助开发者快速定位系统问题。日志内容包含:逻辑 SQL,真实 SQL 和 SQL 解析结果。如果开启配置,日志将使用 Topic ShardingSphere-SQL,日志级别是 INFO。
+ sql-simple: # 是否在日志中打印简单风格的 SQL。
+ executor-size: # 用于设置任务处理线程池的大小。每个 ShardingSphereDataSource 使用一个独立的线程池,同一个 JVM 的不同数据源不共享线程池。
+ max-connections-size-per-query: # 一次查询请求在每个数据库实例中所能使用的最大连接数。
+ check-table-metadata-enabled: # 是否在程序启动和更新时检查分片元数据的结构一致性。
+ proxy-frontend-flush-threshold: # 在 ShardingSphere-Proxy 中设置传输数据条数的 IO 刷新阈值。
+ proxy-transaction-type: # ShardingSphere-Proxy 中使用的默认事务类型。包括:LOCAL、XA 和 BASE。
+ proxy-opentracing-enabled: # 是否允许在 ShardingSphere-Proxy 中使用 OpenTracing。
+ proxy-hint-enabled: # 是否允许在 ShardingSphere-Proxy 中使用 Hint。使用 Hint 会将 Proxy 的线程处理模型由 IO 多路复用变更为每个请求一个独立的线程,会降低 Proxy 的吞吐量。
+ xa-transaction-manager-type: # XA 事务管理器类型。列如:Atomikos,Narayana,Bitronix。
+```
+
## 5.0.0-alpha
### 数据源配置项说明
diff --git a/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.en.md b/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.en.md
index 1aa1a43..5063b5e 100644
--- a/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.en.md
+++ b/docs/document/content/reference/api-change-history/shardingsphere-proxy/_index.en.md
@@ -4,6 +4,62 @@ weight = 1
chapter = true
+++
+## 5.0.0-beta
+
+### Data Source Configuration Item Explanation
+
+```yaml
+schemaName: # Logic schema name.
+
+dataSources: # Data sources configuration, multiple <data-source-name> available.
+ <data-source-name>: # Different from ShardingSphere-JDBC configuration, it does not need to be configured with database connection pool.
+ url: # Database URL.
+ username: # Database username.
+ password: # Database password.
+ connectionTimeoutMilliseconds: # Connection timeout milliseconds.
+ idleTimeoutMilliseconds: # Idle timeout milliseconds.
+ maxLifetimeMilliseconds: # Maximum life milliseconds.
+ maxPoolSize: 50 # Maximum connection count in the pool.
+ minPoolSize: 1 # Minimum connection count in the pool.
+
+rules: # Keep consist with ShardingSphere-JDBC configuration.
+# ...
+```
+
+#### Authentication
+
+It is used to verify the authentication to log in ShardingSphere-Proxy, which must use correct user name and password after the configuration of them.
+
+```yaml
+rules:
+ - !AUTHORITY
+ users:
+ - root@localhost:root # <username>@<hostname>:<password>
+ - sharding@:sharding
+ provider:
+ type: NATIVE # Must be explicitly specified.
+ ```
+
+If the hostname is % or empty, it means no restrict to the user’s host.
+
+The type of the provider must be explicitly specified. Refer to [5.11 Proxy](https://shardingsphere.apache.org/document/5.0.0-beta/en/dev-manual/proxy/) for more implementations.
+
+#### Proxy Properties
+
+```yaml
+props:
+ sql-show: # Whether show SQL or not in log. Print SQL details can help developers debug easier. The log details include: logic SQL, actual SQL and SQL parse result.Enable this property will log into log topic ShardingSphere-SQL, log level is INFO.
+ sql-simple: # Whether show SQL details in simple style.
+ executor-size: # The max thread size of worker group to execute SQL. One ShardingSphereDataSource will use a independent thread pool, it does not share thread pool even different data source in same JVM.
+ max-connections-size-per-query: # Max opened connection size for each query.
+ check-table-metadata-enabled: # Whether validate table meta data consistency when application startup or updated.
+ proxy-frontend-flush-threshold: # Flush threshold for every records from databases for ShardingSphere-Proxy.
+ proxy-transaction-type: # Default transaction type of ShardingSphere-Proxy. Include: LOCAL, XA and BASE.
+ proxy-opentracing-enabled: # Whether enable opentracing for ShardingSphere-Proxy.
+ proxy-hint-enabled: # Whether enable hint for ShardingSphere-Proxy. Using Hint will switch proxy thread mode from IO multiplexing to per connection per thread, which will reduce system throughput.
+ xa-transaction-manager-type: # XA Transaction manager type. Include: Atomikos, Narayana and Bitronix.
+```
+
## 5.0.0-alpha
### Data Source Configuration Item Explanation