[GitHub] [shardingsphere] menghaoranss commented on issue #5627: [DISCUSS] ClusterState feature design

2020-05-20 Thread GitBox


menghaoranss commented on issue #5627:
URL: https://github.com/apache/shardingsphere/issues/5627#issuecomment-631338056


   Because the zookeeper EPHEMERAL node does not support child nodes,so,we will 
persist Datasource state to `instance` node:
   ```
   instanceState: DISABLE
   datasources:
   sharding_db.ds_1:
   state: Node state
   lastConnect: Timestamp
   retryCount: RetryCount
   sharding_db.ds_2:
   state: Node state
   lastConnect: Timestamp
   retryCount: RetryCount   
   ```



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




[GitHub] [shardingsphere] menghaoranss commented on issue #5627: [DISCUSS] ClusterState feature design

2020-05-18 Thread GitBox


menghaoranss commented on issue #5627:
URL: https://github.com/apache/shardingsphere/issues/5627#issuecomment-630538034


   ShardingSphere-Proxy support multiple logical data sources, so datasources 
nodes may be named schema_name.data_source_name, just like: 
   ```
   /
   ├─orchestration-namespace
   ├─orchestration-name
   │ ├─registry
   │ │ ├─instances
   │ │ │ ├─127.0.0.1@3307@xxx
   │ │ │ │ ├─sharding_db.ds_0
   │ │ │ │ ├─sharding_db.ds_1
   │ │ │ │ ├─encrypt_db.ds_2
   │ │ │ │ ├─master_slave_db.ds_3
   │ │ │ ├─127.0.0.1@3308@xxx
   │ │ │ │ ├─sharding_db.ds_0
   │ │ │ │ ├─sharding_db.ds_1
   │ │ │ │ ├─encrypt_db.ds_2
   │ │ │ │ ├─master_slave_db.ds_3
   ```



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




[GitHub] [shardingsphere] menghaoranss commented on issue #5627: [DISCUSS] ClusterState feature design

2020-05-18 Thread GitBox


menghaoranss commented on issue #5627:
URL: https://github.com/apache/shardingsphere/issues/5627#issuecomment-630045131


   As mentioned above,there are some `Configuration Items`  need to be 
configured to decide whether to turn `ClusterState` feature on, whether retry, 
etc. I recommend we can configure like below in Sharding-Proxy `server.yaml`: 
   ```
   cluster:
  heartBeat:   # heartbeat configuration
 sql: select 1; # heartbeat detection sql
 interval: 60 # heartbeat detection intervalm
 retryEnable: true  # whether to retry on failure
 retryMaximum: 3 # maximum number of retries
   
   proxy.cluster.enable: true  // whether to turn on clusterstate switch
   ```
   
   And now we just need configure `heartBeat`, more configurations about 
`cluster` should be added under `cluster` in the future.
   
   any suggestions?



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




[GitHub] [shardingsphere] menghaoranss commented on issue #5627: [DISCUSS] ClusterState feature design

2020-05-17 Thread GitBox


menghaoranss commented on issue #5627:
URL: https://github.com/apache/shardingsphere/issues/5627#issuecomment-629913635


   @dongzl thanks for your suggestion, i will consider optimizing the structure 
of registry center instance. 



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