Logo
HA

HA #

Root Configuration #

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

Attributes:

NameDataTypeDescription
dataSources (+)Collection<DatabaseDiscoveryDataSourceRuleConfiguration>Data source configuration
discoveryHeartbeats (+)Map<String, DatabaseDiscoveryHeartBeatConfiguration>Detect heartbeat configuration
discoveryTypes (+)Map<String, ShardingSphereAlgorithmConfiguration>Database discovery type configuration

Data Source Configuration #

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

Attributes:

NameDataTypeDescriptionDefault Value
groupName (+)StringDatabase discovery group name-
dataSourceNames (+)Collection<String>Data source names, multiple data source names separated with comma. Such as: ds_0, ds_1-
discoveryHeartbeatName (+)StringDetect heartbeat name-
discoveryTypeName (+)StringDatabase discovery type name-

Detect Heartbeat Configuration #

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

Attributes:

NameDataTypeDescriptionDefault Value
props (+)PropertiesDetect heartbeat attribute configuration, keep-alive-cron configuration, cron expression. Such as: ‘0/5 * * * * ?’-

Database Discovery Type Configuration #

Class name:org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration

Attributes:

NameDataTypeDescriptionDefault Value
type (+)StringDatabase discovery type, such as: MGR、openGauss-
props (?)PropertiesRequired parameters for high-availability types, such as MGR’s group-name-