Logo
High Availability

High Availability #

Configuration Entry #

Class name: org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration

configurable properties:

NameData typeDescription
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:

NameData typeDescriptionDefault value
groupName (+)StringDatabase 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 (+)StringListening heartbeat name-
discoveryTypeName (+)StringDatabase discovery type name-

Listening heartbeat configuration #

Class name: org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryHeartBeatConfiguration

configurable properties:

NameData typeDescriptionDefault value
props (+)PropertiesListening 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

NameData typeDescriptionDefault value
type (+)StringDatabase discovery type, such as: MGR, openGauss-
props (?)PropertiesDatabase discovery type configuration, such as group-name property configuration of MGR-