On the MySQL Cluster High Availability Architecture

On the MySQL Cluster High Availability Architecture

Foreword

High availability architecture is a standard requirement for basic Internet services, whether they involve user-facing applications, databases, search engines, or message queues. Each component of a system must achieve high availability to ensure the overall system’s reliability. For database services, achieving high availability can be particularly complex, as it involves not only ensuring continuous access but also maintaining data integrity and correctness.

MySQL Master-Slave Architecture

This architecture, widely adopted due to its simplicity and ease of scaling, separates read and write operations to alleviate pressure on the database. However, it introduces a single point of failure, and data consistency issues may arise due to synchronization delays.

MySQL + DRBD Architecture

Based on the DRBD block-level replication, this architecture addresses the single point of failure issue by implementing a rapid failover mechanism. It uses Heartbeat for high availability software, manages VIPs, and ensures that data replication continues seamlessly even after a primary server fails.

MySQL + MHA Architecture

MHA (Master Ha Switchover) is a mature and commonly used solution for MySQL high availability. Developed by the Japanese community, it automates failover processes while maintaining high data consistency. Key features include simple deployment, automatic monitoring, and failover capabilities, supporting manual or automatic selection of failover modes and adapting to various storage engines.

MySQL + MMM Architecture

MMM (Master-Master Replication Manager) provides a comprehensive solution for managing MySQL master-master replication. It includes scripts for monitoring, failover, and management, ensuring that only one node writes at a time. This setup supports read/write separation and data backup and re-synchronization across nodes.

MySQL Cluster Architecture

MySQL officially offers a high availability cluster solution, though I have not personally used it, making it challenging to evaluate. The architecture involves a group of computers running MySQL servers, NDB Cluster data nodes, a management server, and possibly specialized data access programs. Deployment is time-consuming and relies on the MySQL Cluster Manager, which is free. However, industry experts believe that NDB may not be suitable for most business scenarios and raises security concerns, leading to limited adoption.

Conclusion

Each high availability architecture has its strengths and weaknesses. The choice depends on specific requirements and constraints. Interested readers can explore the official documentation for detailed information on MySQL Cluster installation.


This article was originally published on Penguin No-Friends McCain Laughing Media on March 5, 2018.