All Products
Search
Document Center

ApsaraDB RDS:Create a disaster recovery instance

Last Updated:Dec 15, 2023

This topic describes how to create a disaster recovery ApsaraDB RDS for MySQL instance for a primary ApsaraDB RDS for MySQL instance. A disaster recovery RDS instance resides in a different region than the region in which its primary RDS instance resides. If your primary RDS instance is used for business scenarios in which high data reliability or compliance with financial regulations is required, you can create a disaster recovery RDS instance to increase data reliability.

Background information

ApsaraDB RDS uses Data Transmission Service (DTS) to synchronize data from a primary RDS instance to its disaster recovery RDS instance in real time. The primary RDS instance and the disaster recovery RDS instance are configured as a high-availability architecture. If the primary RDS instance and the secondary RDS instance are inaccessible due to unexpected exceptions such as natural disasters, the database system fails over to the disaster recovery RDS instance. In this case, the disaster recovery RDS instance is promoted to run as the new primary RDS instance. After you update the endpoint information on the application that is connected to the database system, the application immediately connects to the new primary RDS instance.

In the DTS console, you can configure the synchronization settings for a disaster recovery RDS instance. For example, you can change the objects that you want to synchronize, specify the synchronization speed, and specify the synchronization link to report alerts at a specified latency. For more information, see What is DTS?

The following figure shows the topology of a database system that contains a disaster recovery RDS instance.

image

A disaster recovery RDS instance has the following characteristics:

  • A disaster recovery RDS instance is connected over an independent endpoint. You can configure an application to connect to the endpoint of a disaster recovery RDS instance.

  • A disaster recovery RDS instance runs in a high-availability architecture.

  • You are charged for a disaster recovery RDS instance based on the pay-as-you-go billing method.

  • You can configure IP address whitelists and manage accounts on a disaster recovery RDS instance.

Billing

You are charged for the disaster recovery RDS instance and the data synchronization feature of DTS. The following list describes the billing details:

  • A disaster recovery RDS instance has the same configuration as its primary RDS instance and uses the pay-as-you-go billing method. For more information about the pricing of disaster recovery RDS instances, visit the ApsaraDB RDS buy page.

  • The DTS data synchronization link between a disaster recovery RDS instance and its primary RDS instance uses the small specification and the pay-as-you-go billing method. For more information about the pricing of DTS data synchronization links, visit the DTS buy page.

Limits

  • A disaster recovery RDS instance does not support backup and restoration, data migration, database management, public endpoints, or endpoint modifications.

  • A disaster recovery RDS instance does not synchronize database deletion operations from its primary RDS instance. After you delete a database from the primary RDS instance, you must log on to the disaster recovery RDS instance and then execute SQL statements to delete the database.

Prerequisites

  • Your primary RDS instance runs one of the following MySQL versions and RDS editions:

    • MySQL 8.0 on RDS High-availability Edition, RDS Cluster Edition, or RDS Enterprise Edition

    • MySQL 5.7 on RDS High-availability Edition, RDS Cluster Edition, or RDS Enterprise Edition

    • MySQL 5.6

  • Your primary RDS instance resides in a virtual private cloud (VPC).

  • Your primary RDS instance resides in one of the following regions: China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), China (Hong Kong), Singapore, and US (Virginia).

Procedure

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the left-side navigation pane, click Basic Information.

  3. In the Instance Distribution section of the Basic Information page, click Add to the right of Disaster Recovery Instance.

    Note

    If the preceding entry point cannot be found, you must check whether the primary RDS instance meets all prerequisites.

  4. In the Create Task wizard, configure the Database Account and Database Password parameters in the Source Database Information section.

    Note
    • The account must have the REPLICATION SLAVE, REPLICATION CLIENT, and SELECT permissions on all objects that you want to synchronize.

    • If you are using MySQL 5.6, you do not need to configure the Database Account parameter or the Database Password parameter. You can skip this step.

  5. Optional. Configure the Encryption parameter.

    Note

    Specifies whether to encrypt the connection to the database. Select Non-encrypted or SSL-encrypted based on your business requirements. If you select SSL-encrypted, you must enable SSL encryption for the ApsaraDB RDS for MySQL instance before you configure the data synchronization task. For more information, see Configure the SSL encryption feature.

  6. In the Destination Database section, click Purchase Disaster Recovery Instance.

    创建任务

  7. In the Purchase Disaster Recovery Instance dialog box, configure the Select Region and VPC parameters and click Buy Now.

    Important
    • You can specify only the region in which the disaster recovery RDS instance resides. The disaster recovery RDS instance supports only the pay-as-you-go billing method. All the other settings of the disaster recovery RDS instance are the same as the settings of the primary RDS instance. After the disaster recovery RDS instance is created, you can change its specifications in the ApsaraDB RDS console.

    • ApsaraDB RDS requires a few minutes to create the disaster recovery RDS instance. Do not close the dialog box until the disaster recovery RDS instance is created. If you close the dialog box before the disaster recovery RDS instance is created, the disaster recovery RDS instance may fail to be created.

    • The billing method of the DTS synchronization link is pay-as-you-go by default. When you create the DTS synchronization link, you cannot select the subscription billing method for the DTS synchronization link. However, after the DTS synchronization link is created, you can change the billing method of the DTS synchronization link to subscription to reduce costs. For more information, see Change the billing method.

    buy

  8. After the disaster recovery RDS instance is created, click Create account next to RDS Instance ID in the Destination Database section to create a privileged account that is used to synchronize data.

  9. In the Create Task wizard, configure the Database Account and Database Password parameters and click Test Connectivity and Proceed.

    Note

    If you are using MySQL 5.6, you can click Test Connectivity and Proceed directly.

  10. Configure the task based on your business requirements. For more information, see Synchronize data between ApsaraDB RDS for MySQL instances.

  11. On the Synchronization Tasks page, view and manage the synchronization task that is created. For example, you can change the objects that you want to synchronize, configure the monitoring and alerting settings, and change the synchronization speed. For more information, see What is DTS?

    Important

    To ensure that the data on the disaster recovery RDS instance is up-to-date, do not pause the synchronization task.

FAQ

  • What benefits does the disaster recovery RDS instance of my database system bring?

    If the primary RDS instance and the secondary RDS instance are inaccessible due to unexpected exceptions such as natural disasters, your database system fails over to the disaster recovery RDS instance. In this case, the disaster recovery RDS instance is promoted to run as the new primary RDS instance. After you update the endpoint information on the connected application, the application immediately connects to the new primary RDS instance.

    Important

    Data that is written to the new primary RDS instance cannot be synchronized to the original primary RDS instance.

  • Can I select the subscription billing method for disaster recovery RDS instances?

    No, disaster recovery RDS instances support only the pay-as-you-go billing method.