Apache ShardingSphere provides a wealth of system configuration properties, which users can configure through global.yaml.
| Name | Data Type | Description | Default | Dynamic Update |
|---|---|---|---|---|
| sql-show (?) | boolean | Whether to print SQL in logs. SQL logs include logical SQL, actual SQL, and SQL parse results. If enabled, logs use topic org.apache.shardingsphere.sql with log level INFO. |
false | True |
| sql-simple (?) | boolean | Whether to print SQL in a simplified style. | false | True |
| kernel-executor-size (?) | int | Worker thread pool size for SQL execution. 0 means unlimited. |
0 | False |
| max-connections-size-per-query (?) | int | Maximum number of connections that one query request can use in each database instance. | 1 | True |
| max-union-size-per-datasource (?) | int | Maximum UNION ALL size per data source for aggregate rewrite. When route units for one data source exceed this value, they are split into batches to restore parallel execution capability. | Integer.MAX_VALUE | True |
| check-table-metadata-enabled (?) | boolean | Whether to validate table metadata consistency when the application starts or metadata is updated. | false | True |
| load-table-metadata-batch-size (?) | int | Number of table metadata entries loaded per batch when the application starts or refreshes table metadata. | 1000 | True |
| proxy-frontend-database-protocol-type (?) | String | Frontend database protocol type for ShardingSphere-Proxy. Supported values are MySQL, PostgreSQL, openGauss, and Firebird. |
null | True |
| proxy-frontend-flush-threshold (?) | int | I/O flush threshold for records transmitted by the ShardingSphere-Proxy frontend. | 128 | True |
| proxy-backend-query-fetch-size (?) | int | Number of rows fetched when the Proxy backend interacts with databases by cursor. A larger value may increase ShardingSphere-Proxy memory usage. -1 means using the minimum value for each JDBC driver. |
-1 | True |
| proxy-frontend-executor-size (?) | int | Number of threads in the ShardingSphere-Proxy frontend Netty thread pool. 0 means using Netty’s default value. |
0 | False |
| proxy-frontend-max-connections (?) | int | Maximum number of clients that can connect to ShardingSphere-Proxy. 0 means unlimited. |
0 | True |
| proxy-frontend-connection-idle-timeout (?) | long | Frontend connection idle timeout in seconds. | 28800 | True |
| proxy-default-port (?) | int | Default startup port of ShardingSphere-Proxy. | 3307 | False |
| proxy-netty-backlog (?) | int | Netty backlog size of ShardingSphere-Proxy. | 1024 | True |
| cdc-server-port (?) | int | CDC server port. | 33071 | False |
| proxy-frontend-ssl-enabled (?) | boolean | Whether to enable SSL/TLS for the ShardingSphere-Proxy frontend. | false | False |
| proxy-frontend-ssl-version (?) | String | SSL/TLS protocols to enable. If omitted, the default value is TLSv1.2,TLSv1.3. |
TLSv1.2,TLSv1.3 | False |
| proxy-frontend-ssl-cipher (?) | String | Cipher suites to enable, in preference order. Multiple cipher suites are separated by commas. Blank means using the default cipher suites. | "" | False |
| agent-plugins-enabled (?) | boolean | Whether to enable agent plugins. | true | True |
| metadata-identifier-case-sensitivity (?) | String | Metadata identifier case sensitivity. Available values are DATABASE and INSENSITIVE. DATABASE uses the database-specific identifier rule. |
DATABASE | False |
| groovy-inline-expression-parsing-cache-max-size (?) | long | Maximum size of the Groovy inline expression parsing cache. | 1000 | True |
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.
For a complete sample, please refer to global.yaml in ShardingSphere’s repository: https://github.com/apache/shardingsphere/blob/master/proxy/bootstrap/src/main/resources/conf/global.yaml
