To ensure business continuity, ApsaraDB RDS provides a variety of high-availability features, such as Dedicated instance types, the High-availability Edition, multi-zone deployment, and cross-region backup and recovery.
Create a high-availability instance
When you create an instance, consider the following options for building a high availability architecture:
-
Edition: ApsaraDB RDS supports multiple editions. We recommend that you select the High-availability Edition or the more advanced Cluster Edition.
-
High-availability Edition: Uses a classic high availability architecture with one primary and one secondary node.
-
Cluster Edition:
-
For SQL Server: In addition to a primary node and a secondary node, this edition supports up to seven read-only instances to scale out the cluster's read capacity.
-
For MySQL: Instances of the Cluster Edition use an architecture that separates compute from storage and includes one primary node and multiple secondary nodes. It supports features such as automatic failover, promoting any secondary node to be the primary node, readable secondary nodes, on-demand node scaling, multi-zone disaster recovery, node-level monitoring, and cluster topology management. You can also enable MySQL Group Replication (MGR) to achieve a Recovery Point Objective (RPO) of 0. Compared with self-managed databases, this edition is more cost-effective, flexible, and reliable.
-
In the Edition section, select High-availability Edition or Cluster Edition.
-
-
Zone: ApsaraDB RDS supports single-zone and multi-zone deployments. We recommend selecting Multi-zone Deployment. A multi-zone deployment provides zone-level disaster recovery, offering higher availability than a single-zone deployment. Configure the Primary Zone and Network by selecting a zone and a vSwitch. For Deployment Method, select multi-zone deployment. This provides higher availability because traffic automatically fails over if a zone becomes unavailable, achieving cross-zone disaster recovery at no extra cost. Configure the Secondary Zone and Network by selecting a secondary zone and its vSwitch.
-
Instance Type: ApsaraDB RDS provides multiple instance families. We recommend selecting a Dedicated instance type, which includes:
-
Dedicated: Provides fully dedicated CPU and memory resources for stable performance, unaffected by other instances on the same physical host.
-
Dedicated Host: The highest-tier Dedicated option. An instance of this type has exclusive access to all resources on a physical host.
-
Configure automatic backups
To reduce downtime caused by operational errors or database issues, we recommend that you configure an automatic backup policy for your instance. This allows you to quickly restore your data to a specific point in time in case of an incident.
Cross-region disaster recovery
ApsaraDB RDS for MySQL provides cross-region disaster recovery features to protect your data and improve instance availability.
-
Create a disaster recovery instance: Use Data Transmission Service (DTS) to enable real-time data synchronization between a primary instance and its disaster recovery instance. The primary and disaster recovery instances both use a high availability architecture with primary and secondary nodes. If a major failure, such as a natural disaster, in the primary instance's region makes both its primary and secondary nodes unreachable, you can fail over to the disaster recovery instance. After you update the database connection string in your application, you can quickly resume services.
-
Cross-region backup: Automatically replicates local backup files to an Object Storage Service (OSS) bucket in another region.
Configure monitoring and alerts
To prevent instance unavailability caused by issues with CPU, disk, memory, or connections, we recommend that you monitor key performance metrics and configure alert rules to receive notifications when a threshold is breached.
On the instance monitoring page, select the Alarm tab and enable the One-click Alert switch in the upper-right corner. The system automatically creates five default alert rules. The monitored metrics are Connection Usage, Read-only Instance Delay, CPU Utilization, IOPS Utilization, and Disk Space Utilization. The statistical period for each rule is 5 minutes, and the default threshold is 80% (5 seconds for Read-only Instance Delay). The default alert contact group is Cloud Account Alert Contacts. To customize these rules, click Alert Rule Settings.
Restore data
Following these steps to build a high availability architecture helps ensure stable service operation and allows for quick recovery from potential issues.
-
If a single node fails, you can quickly resume service by performing a primary/secondary switchover. This applies to all ApsaraDB RDS instances except for those on the Basic Edition.
-
In case of a zone failure, a multi-zone instance can recover automatically. For a single-zone instance, you must wait for the fault to be resolved or switch to a disaster recovery instance.
-
In case of a region-level disaster, you can switch to a disaster recovery instance or restore data to a new instance from a cross-region backup.
For detailed instructions on how to restore data, see the following topics: