zjcnb opened a new issue #14706:
URL: https://github.com/apache/shardingsphere/issues/14706
Hi community,
Now, readwrite-splitting static and dynamic configuration are together, we
think this is not clear enough. So, we plan to split the readwrite-splitting
static and dynamic configuration to SPI interfaces.
`Before adjustment configuration :`
```
schemaName: readwrite_splitting_db
dataSources:
write_ds:
url:
jdbc:mysql://127.0.0.1:3306/demo_write_ds?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
read_ds_0:
url:
jdbc:mysql://127.0.0.1:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !READWRITE_SPLITTING
dataSources:
read_wirte_ds:
writeDataSourceName: write_ds
readDataSourceNames:
- read_ds_0
loadBalancerName: random
loadBalancers:
random:
type: RANDOM
```
`After adjustment dynamic configuration :`
```
schemaName: readwrite_splitting_db
dataSources:
write_ds:
url:
jdbc:mysql://127.0.0.1:3306/demo_write_ds?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
read_ds_0:
url:
jdbc:mysql://127.0.0.1:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false
username: root
password: 123456
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
rules:
- !READWRITE_SPLITTING
dataSources:
read_wirte_ds:
load-balancer-name: random
type: Dynamic
props:
auto-aware-data-source-name: primary_replica_ds
loadBalancers:
random:
type: RANDOM
```
`After adjustment static configuration :`
```
rules:
- !READWRITE_SPLITTING
dataSources:
read_wirte_ds:
load-balancer-name: random
type: Static
props:
write-data-source-name: write_ds
read-data-source-names: read_ds_0
loadBalancers:
random:
type: RANDOM
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]