All Products
Search
Document Center

ApsaraDB for Redis:Add a child instance to a distributed instance

Last Updated:Mar 01, 2024

After a distributed instance is created, it contains only a single child instance. You must add one or more child instances to the distributed instance for it to work as expected. A single distributed instance can contain up to three child instances. After child instances are added, data is synchronized in real time across all the child instances in the distributed instance.

Prerequisites

A distributed instance is created. For more information, see Create a distributed instance.

Precautions

An added child instance must meet the following requirements:

  • The instance cannot belong to the same zone as the existing child instance.

  • The architecture and specifications of the instance must be the same as those of the existing child instance. For example, each of the child instances must be a cluster instance that has 8 GB of memory and contains two shards.

Note

If the specifications of the child instances are not the same, performance or capacity issues may occur.

Procedure

  1. Log on to the ApsaraDB for Redis console.

  2. In the left-side navigation pane, click Global Distributed Cache.

  3. Find the distributed instance that you want to manage and click the 加号 icon before the instance ID.

  4. On the right side of Child Instances, click Add Child Instance.

  5. On the buy page, configure the following Product Type information.

    • Product Type: Select Redis (Local Disk, Including Tair).

    • Billing Method:

      • Subscription: You must pay for the instance when you create the instance. For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. Alibaba Cloud provides lower prices for longer subscription durations.

      • Pay-as-you-go: You are charged on an hourly basis after you create the instance. For short-term use, we recommend that you select the pay-as-you-go billing method. If you no longer require a pay-as-you-go instance, you can release the instance to reduce costs.

  6. Configure parameters for the child instance.

    Parameter

    Description

    Region

    The region in which you want to create the child instance. You cannot change the region after the instance is created.

    • To maximize access speed, we recommend that you select a region that is close to the geographic location of your users.

    • Make sure that the Tair instance is created in the same region as the ECS instance to which you want to connect. Otherwise, the ApsaraDB for Redis instance and the ECS instance cannot communicate over the internal network to achieve optimal performance.

    Deployment Type

    • Single-zone: The master and replica nodes are deployed in the same zone. This deployment type can provide single-data center disaster recovery.

    • Dual-zone: The master and replica nodes are separately deployed in the specified primary and secondary zones of the same region to form a zone-disaster recovery architecture.

    Primary Zone

    The zone in which you want to create the instance. Each region has multiple isolated locations known as zones. Each zone has its own independent power supply and network. All zones in a region provide the same level of service performance. If the Tair instance resides in the same zone as the ECS instance on which your application is deployed, these instances can deliver optimal performance. If the Tair instance and the ECS instance reside in different zones in the same region, the performance of the ApsaraDB for Redis instance and the ECS instance is slightly lower than the performance of the ApsaraDB for Redis instance and the ECS instance that reside in the same zone.

    Note

    If you set the Deployment Type parameter to Dual-zone Deployment, you must also set the Secondary Zone parameter to a zone that is different from the zone specified for the Primary Zone parameter. The primary and secondary zones form a master-replica zone-disaster recovery architecture.

    Network Type

    The network type of the instance. This parameter can be set only to VPC. A virtual private cloud (VPC) is an isolated network that provides higher security and better performance than the traditional classic network.

    Important
    • Make sure that the Tair instance uses the same network type as the ECS or ApsaraDB RDS instance to which you want to connect. Otherwise, the ECS or ApsaraDB RDS instance cannot access the Tair instance over the internal network.

    • If the VPC network type is selected, make sure that the Tair instance belongs to the same VPC as the ECS or ApsaraDB RDS instance to which you want to connect.

    VPC

    The VPC in which you want to create the instance. If you do not have a VPC, create one first. For more information, see Create and manage a VPC.

    VSwitch

    The vSwitch to which you want to connect the instance in the VPC. If no vSwitches are available in the VPC in the current zone, create a vSwitch. For more information, see Create and manage a vSwitch.

    Edition

    This parameter is set to Enhanced Edition (Tair) and cannot be changed.

    Series

    This parameter is set to DRAM-based and cannot be changed. For more information, see DRAM-based instances.

    Version

    This parameter is set to Redis 5.0 and cannot be changed.

    Architecture Type

    • Standard: uses the master-replica deployment model that provides high-performance caching services and ensures high data reliability.

    • Cluster: eliminates bottlenecks that are caused by the single-threading model. You can use high-performance cluster instances to process large-capacity workloads.

    Select Standard or Cluster. For more information, see Overview.

    Shards

    The number of shards in the Tair cluster instance.

    Note

    This parameter is supported only if the Architecture Type parameter is set to Cluster.

    Node Type

    This parameter is set to Master-Replica and cannot be changed. A master-replica instance provides a master node and a replica node that are deployed in hot standby mode to support data persistence.

    Instance Class

    The specifications of the instance. Each option contains a group of configurations, such as the memory capacity, maximum number of concurrent connections to the instance, and maximum bandwidth. For more information, see DRAM-based standard instances and DRAM-based cluster instances.

    Note

    Database metadata is generated when an instance is created. The size of the metadata on each shard of a cluster instance can range from 30 MB to 50 MB. The total size of the metadata on a cluster instance is equal to the total size of metadata on all shards of the cluster instance.

    Instance Name

    The name of the instance. Specify a descriptive name that helps you identify the instance.

    Subscription Duration

    If you select the Subscription billing method, you must specify a subscription duration and select whether to enable auto-renewal.

    Quantity

    The number of instances that you want to create. The instances must have the same configurations. Set the value to 1.

    Set Password

    • Later: You want to set the password after the instance is created. For more information, see Change or reset the password.

    • Now: You want to set the password immediately.

      • The password must be 8 to 32 characters in length.

      • The password must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.

      • The following special characters are supported:

        !@#$%^&*()_+-=

    Resource Group

    The resource group in which to create the instance.

  7. Click Buy Now.

  8. On the Confirm Order page, read and accept the terms of service, and then complete the payment.

    When the state of the distributed instance changes from Modifying to Running, the child instance is created.

Related API operations

API operation

Description

CreateInstance

Creates a DRAM-based instance that is deployed in local disk-based mode. You can use the instance as the first child instance of a distributed instance. You can also add the instance to an existing distributed instance and use the instance as the second or third child instance.

CreateGlobalDistributeCache

Converts the specified instance to the first child instance of a distributed instance.

DescribeGlobalDistributeCache

Queries the details of a distributed instance.

RemoveSubInstance

Removes a child instance from a distributed instance and converts the child instance to a regular instance. During this process, data is retained.