High Availability #
Configuration Entry #
Class name: org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration
configurable properties:
Name | Data type | Description |
---|---|---|
dataSources (+) | Collection<DatabaseDiscoveryDataSourceRuleConfiguration> | Data source configuration |
discoveryHeartbeats (+) | Map<String, DatabaseDiscoveryHeartBeatConfiguration> | Listening heartbeat configuration |
discoveryTypes (+) | Map<String, ShardingSphereAlgorithmConfiguration> | Database discovery type configuration |
Data Source Configuration #
Class name: org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration
configurable properties:
Name | Data type | Description | Default value |
---|---|---|---|
groupName (+) | String | Database discovery group name | - |
dataSourceNames (+) | Collection<String> | Data source name, multiple data sources need to be separated by commas such as: ds_0, ds_1 | - |
discoveryHeartbeatName (+) | String | Listening heartbeat name | - |
discoveryTypeName (+) | String | Database discovery type name | - |
Listening heartbeat configuration #
Class name: org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryHeartBeatConfiguration
configurable properties:
Name | Data type | Description | Default value |
---|---|---|---|
props (+) | Properties | Listening heartbeat property configuration, keep-alive-cron property configuration cron expression, such as: ‘0/5 * * * * ?’ | - |
Database Discovery Type Configuration #
Class name: org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration
Name | Data type | Description | Default value |
---|---|---|---|
type (+) | String | Database discovery type, such as: MGR, openGauss | - |
props (?) | Properties | Database discovery type configuration, such as group-name property configuration of MGR | - |