tristaZero commented on issue #8615:
URL: https://github.com/apache/shardingsphere/issues/8615#issuecomment-744420171
Hi, after looking at `replica-qeury-rule.yaml`, I try to give some of my
thoughts below.
```yaml
rules:
- !REPLICA_QUERY
dataSources:
ds_0:
primaryDataSourceName: primary_ds_0
replicaDataSourceNames:
- primary_ds_0_replica_0
- primary_ds_0_replica_1
loadBalancerName: roundRobin
ds_1:
primaryDataSourceName: primary_ds_1
replicaDataSourceNames:
- primary_ds_1_replica_0
- primary_ds_1_replica_1
loadBalancerName: random
loadBalancers:
roundRobin:
type: ROUND_ROBIN
random:
type: RANDOM
```
```sql
CREATE REPLICA_QUERY RULE (
logic_ds_a (primary=primary_ds_a, repilca=(repilca_ds_a_0, repilca_ds_a_1),
load_balancer=RANDOM(xxx=xxx),
logic_ds_b (primary=primary_ds_b, repilca=(repilca_ds_b_0, repilca_ds_b_1),
load_balancer=ROUNDROBIN(xxx=xxx),
)
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]