Updated on 2024-08-07 GMT+08:00

Solution Overview

Scenarios

This solution is developed based on Master High Availability (MHA) and helps you deploy highly available MySQL clusters on Huawei Cloud cloud servers. MHA is a mature and open source MySQL HA program that provides heartbeat detection, primary/standby replication, failover, and alert email sending. It is suitable for enterprises that require high availability, data integrity, and almost uninterrupted maintenance of primary servers.

Architecture

This solution helps you quickly deploy an MHA MySQL cluster on Huawei Cloud. The following figure shows the deployment architecture.
Figure 1 Architecture

This solution will:

  • Create three FlexusX instances, add them to the same FlexusX group, configure an anti-affinity policy, deploy them across AZs, and install the MHA and MySQL software on each FlexusX instance.
  • Create a virtual IP address (VIP) for primary/standby switchover of the MySQL databases.
  • Assign three EIPs for Internet access and alarm notifications in case of any faults.
  • Create a security group to secure the FlexusX instance environment by controlling access to FlexusX instances.

Advantages

  • High reliability

    The cloud servers configured with the anti-affinity policy and deployed across AZs provide cross-AZ disaster recovery. MHA is installed for automated failover and primary/standby replication, helping ensure data consistency in the event of a failure.

  • Lower cost

    MHA is composed of MHA Manager and MHA Node. MHA Manager is installed on one of the cloud servers where the standby databases are deployed. No additional cloud server is required.

  • Easy deployment

    Resources can be quickly provisioned and a highly available MySQL cluster can be easily created.

Constraints

  • Before deploying this solution, ensure that you have created a Huawei ID with access to the target region and enabled Huawei Cloud services.
  • If you select the yearly/monthly billing mode, ensure that your account has sufficient balance. If you do not have sufficient balance, you can go to the Billing Center to manually pay for the order.
  • Ensure that you have an email account for sending emails over SMTP.
  • Currently, FlexusX instances can be deployed only in the AP-Bangkok region.