Logo
Readwrite-splitting

Readwrite-splitting #

Configuration Item Explanation #

Namespace: http://shardingsphere.apache.org/schema/shardingsphere/readwrite-splitting/readwrite-splitting-5.1.2.xsd

<readwrite-splitting:rule />

NameTypeDescription
idAttributeSpring Bean Id
data-source-rule (+)TagReadwrite-splitting data source rule configuration

<readwrite-splitting:data-source-rule />

NameTypeDescription
idAttributeReadwrite-splitting data source rule name
static-strategyTagStatic Readwrite-splitting type
dynamic-strategyTagDynamic Readwrite-splitting type
load-balance-algorithm-refAttributeLoad balance algorithm name

<readwrite-splitting:static-strategy />

NameTypeDescription
idAttributeStatic readwrite-splitting name
write-data-source-nameAttributeWrite data source name
read-data-source-namesAttributeRead data source names, multiple data source names separated with comma
load-balance-algorithm-refAttributeLoad balance algorithm name

<readwrite-splitting:dynamic-strategy />

NameTypeDescription
idAttributeDynamic readwrite-splitting name
auto-aware-data-source-nameAttributeDatabase discovery logic data source name
write-data-source-query-enabledAttributeAll read data source are offline, write data source whether the data source is responsible for read traffic
load-balance-algorithm-refAttributeLoad balance algorithm name

<readwrite-splitting:load-balance-algorithm />

NameTypeDescription
idAttributeLoad balance algorithm name
typeAttributeLoad balance algorithm type
props (?)TagLoad balance algorithm properties

Please refer to Built-in Load Balance Algorithm List for more details about type of algorithm. Please refer to Use Norms for more details about query consistent routing.