Background

Apache ShardingSphere provides a wealth of system configuration properties, which users can configure through server.yaml.

Parameters

NameData TypeDescriptionDefaultDynamic Update
system-log-level (?)StringSystem log output level, supports DEBUG, INFO, WARN and ERROR, the default level is INFO.falseTrue
sql-show (?)booleanWhether 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.
falseTrue
sql-simple (?)booleanWhether to print simple SQL in logs.falseTrue
kernel-executor-size (?)intSet 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.infiniteFalse
max-connections-size-per-query (?)intThe maximum number of connections that a query request can use in each database instance.1True
check-table-metadata-enabled (?)booleanWhether shard metadata is checked for structural consistency when the program is started and updated.falseTrue
proxy-frontend-flush-threshold (?)intSet the I/O refresh threshold for the number of transmitted data items in ShardingSphere-Proxy.128True
proxy-backend-query-fetch-size (?)intThe 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.-1True
proxy-frontend-executor-size (?)intThe number of threads in the Netty thread pool of front-end Proxy.0False
proxy-frontend-max-connections (?)intThe maximum number of clients that can be connected to Proxy. The default value of 0 indicates that there’s no limit.0True
proxy-default-port (?)StringProxy specifies the default window through configuration files.3307False
proxy-netty-backlog (?)intProxy specifies the default netty back_log parameter through configuration files.1024False
proxy-frontend-database-protocol-type (?)StringProxy front-end protocol type, supports MySQL, PostgreSQL, openGauss“”False
proxy-frontend-ssl-enabled (?)booleanEnable SSL/TLS for ShardingSphere-Proxy frontend.falseFalse
proxy-frontend-ssl-version (?)StringThe SSL/TLS protocols to enable. Blank to use default.TLSv1.2,TLSv1.3False
proxy-frontend-ssl-cipher (?)StringThe 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