You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/03/11 10:13:09 UTC

[GitHub] [shardingsphere] tristaZero commented on issue #9590: Refactor the features of shardingsphere-replica-query and shardingsphere-ha

tristaZero commented on issue #9590:
URL: https://github.com/apache/shardingsphere/issues/9590#issuecomment-796625307


   Hi, here is another solution for consideration
   
   ```sql
   rules:
     - !HA # Need new name, todo
       dataSources:
         pr_ds:
           name: pr_ds # removed
           dataSourceNames:
             - ds_0
             - ds_1
             - ds_2
           replicaQuery: false # removed
           haTypeName: mgr
       haTypes:
         mgr:
           type: MGR
           props:
             groupName: 92504d5b-6dec-11e8-91ea-246e9612aaf1
             zkServerLists: 'localhost:2181'
             keepAliveCron: '0/5 * * * * ?'
   
     - !REPLICA_QUERY # Need new name, todo
       dataSources:
         ds_0:
           primaryDataSourceName: primary_ds_0
           replicaDataSourceNames:
             - primary_ds_0_replica_0
             - primary_ds_0_replica_1
           loadBalancerName: roundRobin
         ds_1: # new
           autoAwareDataSourceName: pr_ds
           loadBalancerName: random
       loadBalancers:
         roundRobin:
           type: ROUND_ROBIN
         random:
           type: RANDOM
   ```
   
   Notes,
   - `HA` and `REPLICA_QUERY` need new names
   - `ds_1` is an example for using `HA` and `REPLICA_QUERY` togather
   - Remove `name` and `replicaQuery` of `HA` rule


----------------------------------------------------------------
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:
users@infra.apache.org