Help Center> GeminiDB> GeminiDB Redis API> Active-active DR> Network Configurations> Network Configurations for Primary and Standby Instances in Different Regions
Updated on 2024-05-20 GMT+08:00

Network Configurations for Primary and Standby Instances in Different Regions

GeminiDB Redis allows you to create two active instances in different regions. Data between them is synchronized. Once one region becomes faulty, the other one can take over read/write traffic to ensure service continuity.

Before you create a dual-active DR relationship, create a cloud connection between the two VPCs where the two instances are deployed so that the VPCs can be connected.

Procedure

  1. Create two different VPCs (VPC1 and VPC2) in two different regions.

    1. Log in to the network console.
    2. In the navigation pane, choose Virtual Private Cloud > My VPCs.
    3. Click Create VPC.
      Figure 1 Creating a VPC
    4. On the Basic Information page, set related parameters for VPC1.
      Figure 2 Setting VPC1 parameters
      Table 1 VPC1 configurations

      Parameter

      Description

      Example Value

      Region

      Region where the VPC is created. For lower network latency and faster access to your resources, select the region nearest to you.

      -

      Name

      VPC name

      vpc-10-0

      IPv4 CIDR Block

      CIDR block of the VPC. The CIDR block of any subnet in the VPC must be within the VPC CIDR block.

      10.0.0.0/24

      IPv4 CIDR Block

      CIDR block for the subnet. The block must be within the VPC CIDR block.

      10.0.0.0/24

      Retain default values for the parameters not listed in the above table.

    5. Create VPC2 by referring to 1.d.
      Figure 3 Configuring VPC information
      Table 2 VPC2 configurations

      Parameter

      Description

      Example Value

      Region

      Select a region different from VPC1.

      -

      Name

      VPC name

      vpc-10-1

      IPv4 CIDR Block

      Select a CIDR block different from VPC1 CIDR block.

      10.1.0.0/24

      IPv4 CIDR Block

      CIDR block for the subnet. The block must be within the VPC CIDR block.

      10.1.0.0/24

  2. Create a cloud connection in the region where VPC2 is created.

    1. Log in to the network console.
    2. In the navigation pane on the left, choose Cloud Connect > Cloud Connections.
    3. Click Create Cloud Connection.
      Figure 4 Creating a cloud connection

  3. Click the name of the cloud connection created in 2, select Network Instances, and click Load Network Instance. Load VPC1 and VPC2 network instances in order and click OK.

    Table 3 VPC1 network information

    Parameter

    Description

    Example Value

    Account

    Current account

    -

    Region

    The region where VPC1 is created

    -

    Instance Type

    VPC

    -

    VPC

    VPC1 name You can select one from the drop-down list.

    vpc-10-0

    VPC CIDR

    VPC1 subnet

    10.0.0.0/24

    Table 4 VPC2 network information

    Parameter

    Description

    Example Value

    Account

    Current account

    -

    Region

    The region where VPC2 is created

    -

    Instance Type

    VPC

    -

    VPC

    VPC2 name You can select one from the drop-down list.

    vpc-10-1

    VPC CIDR

    VPC2 subnet

    10.1.0.0/24

  4. Go back to the Cloud Connections page, choose Bandwidth Packages, and click Buy Bandwidth Package.

    Figure 5 Buying a bandwidth package

  5. Click the name of the cloud connection created in 2, select Inter-Region Bandwidths, and click Assign Inter-Region Bandwidth.

    Figure 6 Assigning an inter-region bandwidth

  6. Configure a security group in the region where VPC1 is created, add an inbound rule, select TCP (Customer ports) and enter port number 8635, and enter the IP address of VPC2 in region .

    Figure 7 Manage Rule button
    Figure 8 Adding an inbound rule

  7. Configure a security group in the region where VPC2 is created, add an inbound rule, select TCP (Customer ports) and enter port number 8635, and enter the IP address of VPC1 in region .

    Figure 9 Manage Rule button
    Figure 10 Adding an inbound rule

  8. VPC1 and VPC2 in the two regions are connected using a cloud connection. Then you can buy GeminiDB Redis instances in VPC1 and VPC2, respectively and select the security groups configured in 6 and 7. For details about how to buy a GeminiDB Redis instance, see Buying an Instance.