Updated on 2024-11-22 GMT+08:00

Creating a DR Relationship

Scenarios

After a cross-region DR relationship is created, if the region where the primary instance is located encounters a natural disaster and the primary instance cannot be connected, you can promote the DR instance in another region to primary. To connect to the new primary instance, you only need to change the connection address on the application side.

Precautions

  • Before using this function, ensure that the network between the DB instances in two different regions is connected. You can use Cloud Connect or Virtual Private Network (VPN) to connect the VPCs in different regions.
  • Before using this function, ensure that the primary instance and DR instance are available and are deployed in different regions. The primary instance uses a primary/standby deployment and the DR instance uses a standalone deployment.
  • The vCPUs, memory, and storage space of the DR instance must be greater than or equal to those of the primary instance.
  • RDS for PostgreSQL 12 and later versions support cross-region DR.
  • After changing the database port or private IP address of the primary instance, you need to re-establish the DR relationship.

Procedure

  1. Paste the information of the DR instance to the production instance and configure DR for the production instance.

    1. Log in to the management console.
    2. Click in the upper left corner and select the region where the DR instance is located, for example, AP-Singapore.
    3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
    4. On the Instances page, click the DR instance name to go to the Overview page.
    5. Click DR Information.
    6. In the displayed dialog box, click Copy.
      Figure 1 Copying DR instance information
    7. Click in the upper left corner of the management console and select the region where the production instance is located, for example, CN-Hong Kong.
    8. On the Instances page, locate the production instance and choose More > View DR Details in the Operation column.
    9. Click Create DR Relationship. In the displayed dialog box, paste the DR information copied from 1.f to the text box and click OK to configure DR for the production instance.
      Figure 2 Pasting DR instance information
    10. On the DR Management page of the production instance, check whether the DR is configured. If the value of DR Relationship Creation is Successful, the DR is successfully configured for the production instance. Perform subsequent operations only after this task is successfully executed.
      Figure 3 Checking whether the DR is configured

  2. Paste the information of the production instance to the DR instance and configure DR for the DR instance.

    1. On the Instances page, click the production instance name to go to the Overview page.
    2. Click DR Information.
    3. In the displayed dialog box, click Copy.
    4. Click in the upper left corner and select the region where the DR instance is located, for example, AP-Singapore.
    5. On the Instances page, locate the DR instance and choose More > View DR Details in the Operation column.
    6. Click Create DR Relationship. In the displayed dialog box, paste the DR information copied from 2.c to the text box and click OK to configure DR for the DR instance.
    7. On the DR Management page, check whether the DR is configured. If the value of DR Relationship Creation is Successful, the DR is successfully configured for the DR instance.
    8. On the DR Management page, you can view the DR replication status, sending delay, end-to-end delay, and replay delay.