Proposal for a Robust High-Availability Architecture with Redundant Sharding and Seamless Failover in SS #29674
JiekerTime
started this conversation in
Ideas
Replies: 1 comment
-
I need a swift response as this will impact my task planning for the new year. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've conceptualized a high-availability architecture that I'd like to discuss with the community to see if it's feasible for implementation in SS. If given the green light, I'm keen on taking the lead on this module.
Consider a setup with three shards labeled 1, 2, 3, and 4, distributed across three databases (currently not sharded by table, but that's open to future analysis). The data distribution is as follows:
We then create redundant copies of the data:
This redundancy ensures high availability, allowing traffic to be rerouted to databases 1 and 4 if database 2 fails, providing seamless failover. It also opens up opportunities for optimizing scenarios that typically require cross-database joins.
In transactional scenarios, changes to shards 1 and 2 would be split into two atomic operations to maintain consistency through two-phase commit (2PC) logic.
Each atomic operation would be assigned a globally unique timestamp, ensuring the global order of operations even when updates are executed in parallel across different databases.
Atomic operation 1:
Atomic operation 2:
These atomic operations could be orchestrated using a consensus algorithm. Updates would be queued and ordered by timestamp, with all replicas applying updates in this sequence. We could also potentially integrate MVCC to enhance this system.
However, there are clear downsides:
If we proceed with this feature, my plan is as follows:
First, we'll develop for MySQL&&Sharding DB:
Second, support all kind of sharding.
Finally, we'll extend support for multi-language environments.
Of course, other incremental features could be added as needed.
Beta Was this translation helpful? Give feedback.
All reactions