How PhxSQL Achieves MySQL-Compatible High Availability with Strong Consistency
PhxSQL is an open‑source, MySQL‑compatible relational database cluster that provides high availability and strong data consistency through a single‑master multi‑slave architecture, automatically switching masters when over half the nodes are alive, without relying on external services like Zookeeper, and requiring no code changes for migration.
PhxSQL is an open‑source project that implements a MySQL‑compatible, highly available, strongly consistent relational database cluster.
It uses a single‑master multi‑slave deployment; when more than half of the machines in the cluster are alive, it can automatically switch the master while guaranteeing data consistency.
Advantages over typical MySQL HA solutions
Provides both high availability and strong consistency, achieving consistency comparable to Zookeeper.
Does not depend on third‑party leader election services such as Zookeeper, simplifying deployment.
Fully compatible with MySQL, allowing existing MySQL applications to migrate without any code changes.
The article presents the design and implementation of PhxSQL in a PPT format, starting from MySQL’s disaster‑recovery shortcomings, describing the ideas behind the high‑availability strong‑consistency solution, analyzing key points and solutions for each implementation step, and finally showing the results in terms of disaster recovery and performance.
GitHub repository: https://github.com/tencent-wechat/phxsql
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
WeChat Backend Team
Official account of the WeChat backend development team, sharing their experience in large-scale distributed system development.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
