All Products
Search
Document Center

ApsaraDB RDS:Implement geo-disaster recovery on an ApsaraDB RDS for SQL Server instance

Last Updated:Jul 10, 2023

ApsaraDB RDS for SQL Server provides a geo-disaster recovery solution that allows the system to automatically synchronize data from your ApsaraDB RDS for SQL Server instance to a disaster recovery RDS instance. If your RDS instance fails, you can switch workloads on the RDS instance to a disaster recovery RDS instance that resides in a different region. This ensures business continuity and service availability.

Prerequisites

  • Two RDS instances are created. One resides in Region A, and the other resides in Region B. Each RDS instance meets the following requirements:

    • The major engine version is SQL Server 2017 EE on RDS Cluster Edition, SQL Server 2019 EE on RDS Cluster Edition, or SQL Server 2022 EE on RDS Cluster Edition.

    • The RDS edition is RDS Cluster Edition.

    • The storage type is enhanced SSD (ESSD).

    Note
    • You can go to the Basic Information page of your RDS instance to view the preceding information.

    • In this topic, the RDS instance in Region A is considered the source RDS instance, and the RDS instance in Region B is considered the disaster recovery RDS instance.

    • We recommend that the RDS instances run the same major engine version and use the same instance type.

    • For more information about how to create an RDS instance, see Create an ApsaraDB RDS for SQL Server instance.

  • A virtual private cloud (VPC) named VPC1 is created in Region A, and VPC2 is created in Region B. Applications are deployed on Elastic Compute Service (ECS) instances in both VPC1 and VPC2. For more information, see Create a VPC with an IPv4 CIDR block.

Usage notes

  • Logon information and jobs in the database of the source RDS instance are not automatically synchronized to the disaster recovery RDS instance.

  • The disaster recovery RDS instance can process only read requests.

  • If the source RDS instance fails, a switchover is performed between the source RDS instance and the disaster recovery RDS instance. If you want the disaster recovery RDS instance to process read and write requests by interrupting network connections between regions, you must make sure that the disaster recovery RDS instance is no longer the secondary replica on the source RDS instance. Otherwise, data synchronization and log truncation may fail, and the storage capacity of the source RDS instance may be exhausted.

Step 1: Create a CEN instance

  1. Log on to the CEN console.
  2. On the Instances page, click Create CEN Instance.
  3. In the Create CEN Instance dialog box, set the following parameters and click OK.
    • Name: Enter a name for the CEN instance.
    • Description: Enter a description for the CEN instance.

Step 2: Connect VPC1 and VPC2 to the CEN instance

You must establish network connections between Region A and Region B to ensure that VPC1 and VPC2 can communicate with each other.

  1. On the Instances page, click the ID of the CEN instance created in Step 1.

  2. In the VPC section of the Basic Settings tab, click the 添加.png icon.

  3. On the Connection with Peer Network Instance page, configure the following parameters and click OK. Parameter:

    • Network Type: Select the type of network instance that you want to attach.
    • Region: Select the region where the network instance is deployed.
    • Transit Router: The system automatically creates a transit router in the selected region.
    • Resource Owner ID: Select the Alibaba Cloud account to which the VPC belongs.
    • Network Instance: Select the ID of the network instance.

    Repeat Step 1 to Step 3 to connect VPC1 in Region A to the CEN instance and VPC2 in Region B and the CEN instance. Make sure that the Network Type parameter is set to Virtual Private Cloud (VPC). The following table provides a configuration example.

    Parameter

    VPC1

    VPC2

    Network Type

    VPC

    VPC

    Region

    Region A

    Region B

    Resource Owner ID

    Your Account

    Your Account

    Network Instance

    VPC1

    VPC2

Step 3: Purchase a bandwidth plan

To establish connections between VPC1 and VPC2, you must purchase a bandwidth plan and create an inter-region connection.

  1. On the Instances page, click the ID of the CEN instance created in Step 1.

  2. On the page that appears, click the Basic Settings tab and then the Bandwidth Plans tab. On the tab that appears, click Purchase Bandwidth Plan(Subscription).

  3. On the page that appears, configure the required parameters and click Buy Now.

    For more information about the required parameters, see Use a bandwidth plan.

Step 4: Create an inter-region connection

  1. On the Instances page, click the ID of the CEN instance created in Step 1.

  2. On the page that appears, click the Basic Settings tab and then the Bandwidth Plans tab. On the tab that appears, click Set Region Connection.

  3. On the Connection with Peer Network Instance page, configure the following parameters and click OK.

    Parameter

    Description

    Network Type

    Select Inter-region Connection.

    Region

    Select Region A.

    Transit Router

    The system automatically displays the ID of the transit router in the selected region.

    Peer Region

    Select the other region to be connected. In this example, Region B is selected.

    Transit Router

    The system automatically displays the ID of the transit router in the selected region.

    Bandwidth Plan

    Select the bandwidth plan that is associated with the CEN instance.

    Bandwidth

    Specify a bandwidth value for the inter-region connection. Unit: Mbit/s.

Step 5: (Optional) Test network connectivity

After the preceding steps are complete, VPC1 and VPC2 can communicate with each other. In this example, VPC1 is used to test the network connectivity between VPC1 and VPC2.

Note

ECS instances in VPC1 and VPC2 run the Alibaba Cloud Linux operating system. For more information about how to use the ping command on other operating systems, see the manual of the operating system that you use.

  1. Log on to the ECS instance that is deployed in VPC1. For more information, see Connection methods.
  2. On the ECS instance, run the ping command to test the network connectivity between VPC1 and VPC2.
    Note In this example, VPC1 runs the Alibaba Cloud Linux operating system. For more information about how to use the ping command in other operating systems, see the manual of the operating system that you use.
    ping <The IP address of the ECS instance in VPC2>  

    The following echo reply packet indicates that VPC1 and VPC2 are connected.

    Use Basic Edition transit routers to connect VPCs in the same region - test network connectivity

The network connection between the source RDS instance and the disaster recovery RDS instance is successfully established.

What to do next

After you complete Step 1 to Step 5, contact Alibaba Cloud after-sales technical support. After-sales technical support will help you configure settings such as security groups and firewalls so that you can use the RDS instance in Region B as the disaster recovery RDS instance.

Important

If your RDS instance fails, you need to contact Alibaba Cloud after-sales technical support to help you perform a switchover.

References