Background
Apache ShardingSphere provides a wealth of system configuration properties, which users can configure through server.yaml
.
Parameters
Name | Data Type | Description | Default | Dynamic Update |
---|---|---|---|---|
system-log-level (?) | String | System log output level, supports DEBUG, INFO, WARN and ERROR, the default level is INFO. | false | True |
sql-show (?) | boolean | Whether to print SQL in logs. Printing SQL can help developers quickly locate system problems. Logs contain the following contents: logical SQL, authentic SQL and SQL parsing result. If configuration is enabled, logs will use Topic ShardingSphere-SQL , and log level is INFO. | false | True |
sql-simple (?) | boolean | Whether to print simple SQL in logs. | false | True |
kernel-executor-size (?) | int | Set the size of the thread pool for task processing. Each ShardingSphereDataSource uses an independent thread pool, and different data sources on the same JVM do not share thread pools. | infinite | False |
max-connections-size-per-query (?) | int | The maximum number of connections that a query request can use in each database instance. | 1 | True |
check-table-metadata-enabled (?) | boolean | Whether shard metadata is checked for structural consistency when the program is started and updated. | false | True |
proxy-frontend-flush-threshold (?) | int | Set the I/O refresh threshold for the number of transmitted data items in ShardingSphere-Proxy. | 128 | True |
proxy-backend-query-fetch-size (?) | int | The number of rows of data obtained when the backend Proxy interacts with databases (using a cursor). A larger number may increase the occupied memory of ShardingSphere-Proxy. The default value of -1 indicates the minimum value for JDBC driver. | -1 | True |
proxy-frontend-executor-size (?) | int | The number of threads in the Netty thread pool of front-end Proxy. | 0 | False |
proxy-frontend-max-connections (?) | int | The maximum number of clients that can be connected to Proxy. The default value of 0 indicates that there’s no limit. | 0 | True |
proxy-default-port (?) | String | Proxy specifies the default window through configuration files. | 3307 | False |
proxy-netty-backlog (?) | int | Proxy specifies the default netty back_log parameter through configuration files. | 1024 | False |
proxy-frontend-database-protocol-type (?) | String | Proxy front-end protocol type, supports MySQL, PostgreSQL, openGauss | “” | False |
proxy-frontend-ssl-enabled (?) | boolean | Enable SSL/TLS for ShardingSphere-Proxy frontend. | false | False |
proxy-frontend-ssl-version (?) | String | The SSL/TLS protocols to enable. Blank to use default. | TLSv1.2,TLSv1.3 | False |
proxy-frontend-ssl-cipher (?) | String | The cipher suites to enable, in the order of preference. Multi cipher suites separated by comma. Blank to use default. | “” | False |
Properties can be modified online through DistSQL#RAL. Properties that support dynamic change can take effect immediately. For the ones that do not support dynamic change, the effect will be implemented after a restart.
Sample
For a complete sample, please refer to server.yaml
in ShardingSphere’s repository:https://github.com/apache/shardingsphere/blob/aac0d3026e00575114701be603ec189a02a45747/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/resources/conf/server.yaml#L71-L93
当前内容版权归 ShardingSphere 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 ShardingSphere .