gg1myn opened a new issue, #37179:
URL: https://github.com/apache/shardingsphere/issues/37179

   ## Question
   
   **For English only**, other languages will not accept.
   
   Before asking a question, make sure you have:
   
   - Googled your question.  Yes
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).  Yes
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview). Yes
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   
----------------------------------------------------------------------------------------------------------------
   
   **Problem:**
   
   We see a black out today if our database is down as it has single master 
node. We do have a innodb cluster setup but we face 2 problems:
   1. Failover takes 3-4 minutes in some cases where applications keep in 
retrying before becoming stable again even though failover finishes faster.
   2. Malicious config application/schema change results in downtime for 
complete cluster. 
   
   **Solution:** 
   We are working on a solution to improve the availability of our mysql 
databases. We are thinking of applying sharding to achieve this. We are 
exploring sharding sphere for the same. 
   
   **Proposal:**
   We will have 2 shards in a database and we want to route new writes to a 
single healthy cluster shard in case one of the shard cluster is 
down/unresponsive. The health of shards will be queries periodically and 
maintained in a registry. 
   The sharding key will be generated and will be appended with the information 
of shard id it is being written to. Identification of the shard will be dynamic 
at runtime based on shard health status.
   Query routing will extract this shard id from the key and will call the 
right shard.
   
   This dynamic routing strategy is not available out of the box in the 
sharding sphere and we could not find discussions on the same. We wanted to 
understand thoughts on this approach and pros/cons aroud it. We are thinking of 
extending the interfaces to implement this custom strategy for our usecase. 
   


-- 
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]

Reply via email to