All Products
Search
Document Center

ApsaraDB for Redis:Create a distributed instance

Last Updated:Sep 13, 2023

You can create a distributed instance by purchasing an ApsaraDB for Redis instance as the first child instance or converting an existing ApsaraDB for Redis instance into the first child instance. You can use a distributed instance in scenarios such as active geo-redundancy, disaster recovery, and data synchronization across regions.

Background information

Global Distributed Cache for Redis is an active geo-redundancy database system that is developed in-house by Alibaba Cloud based on ApsaraDB for Redis. Global Distributed Cache for Redis uses synchronization channels to connect multiple child instances to form a logical distributed instance. All child instances are readable and writable. Data is synchronized in real time among the child instances. Global Distributed Cache for Redis supports business scenarios in which multiple sites in different regions provide services at the same time. It helps enterprises replicate the active geo-redundancy architecture of Alibaba. For more information, see Overview.

Billing

You are not charged for creating a distributed instance but are charged for the child instances in the distributed instance. Child instances are billed in the same manner as regular ApsaraDB for Redis instances. For more information, see Billable items.

Creation methods and limits

You cannot directly create a distributed instance. You can purchase an ApsaraDB for Redis instance as the first child instance of a distributed instance, or convert an existing ApsaraDB for Redis instance into the first child instance of a distributed instance. Then, the distributed instance is automatically created. The following table describes the methods for creating a distributed instance and their limits.

Method

Limits

Description

Create a distributed instance by purchasing an ApsaraDB for Redis instance as the first child instance

  • The instance that you want to purchase must be a DRAM-based instance of ApsaraDB for Redis Enhanced Edition (Tair). For more information, see DRAM-based instances.

If you purchase an ApsaraDB for Redis instance as the first child instance of a distributed instance, the distributed instance is automatically created.

Create a distributed instance by converting an ApsaraDB for Redis instance into the first child instance

If you select an existing ApsaraDB for Redis instance to convert it into the first child instance of a distributed instance, the distributed instance is automatically created.

Note

For more information about the limits of distributed instances, see Limits.

Create a distributed instance by purchasing an ApsaraDB for Redis instance as the first child instance

  1. Log on to the ApsaraDB for Redis console.
  2. In the left-side navigation pane, click Global Distributed Cache.

  3. In the upper-left corner of the page, choose Create Instance > Create Distributed Instance.

  4. On the buy page, configure the parameters described in the following table.

    Parameter

    Description

    Product Type

    The type of the child instance. Select Redis (Local Disk, Including Tair).

    Billing Method

    The billing method of the child instance.

    • Subscription: You must pay a subscription fee when you create an instance. For long-term usage, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are charged lower prices for longer subscription durations.

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

      Note

      You can switch the billing method from pay-as-you-go to subscription, but cannot switch it from subscription to pay-as-you-go.

    Deployment Mode

    The deployment mode of the child instance. Select Classic (Local Disk-based).

  5. Configure the parameters described in the following table for the new child instance.

    Parameter

    Description

    Region

    The region in which you want to create the 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.

    • To enable connections over an internal network, make sure that the ApsaraDB for Redis instance is deployed in the same region as Elastic Compute Service (ECS) instances that need to access the ApsaraDB for Redis instance. Otherwise, these ECS instances can access the ApsaraDB for Redis instance only over the Internet. This does not fully unleash the performance of the ApsaraDB for Redis instance.

    Deployment Type

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

    • Dual-zone Deployment: The master node and replica node are separately deployed in the specified primary zone and secondary zone 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. No substantive differences exist between zones in the same region. If the ApsaraDB for Redis instance resides in the same zone as the ECS instance on which your application is deployed, these instances can deliver optimal performance. If the ApsaraDB for Redis 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 together 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 VPC is an isolated network that provides higher security and better performance than the traditional classic network.

    Important
    • To enable connections over an internal network, make sure that the ApsaraDB for Redis instance is connected to the same type of network as the ECS instances or ApsaraDB RDS instances that need to access the ApsaraDB for Redis instance.

    • If the VPC network type is selected, make sure that the ApsaraDB for Redis instance is connected to the same VPC as the ECS instances or ApsaraDB RDS instances that need to access the ApsaraDB for Redis instance.

    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 that you want to connect to the instance in the VPC. If no vSwitches are created in the VPC in the selected zone, create a vSwitch first. 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 Performance-enhanced 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.

    • Read/Write Splitting: ensures high availability, high performance, and high flexibility. The read/write splitting architecture allows a large number of concurrent reads of hot data from read replicas. This reduces the loads on the master node and minimizes O&M costs.

    For more information, see Overview.

    Shards

    The number of shards for the ApsaraDB for Redis 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 instance specifications. Each instance type has a specific memory size, maximum number of connections, and bandwidth limit. For more information, see DRAM-based standard instances and DRAM-based cluster instances.

    Note

    Database metadata is generated when an ApsaraDB for Redis instance is created. The size of the metadata on each shard of a cluster instance ranges from 30 MB to 50 MB. The total size of the metadata in a cluster instance equals the total size of metadata on all shards.

    Instance Name

    The name of the instance. Specify a name that is easy for you to identify.

    Subscription Duration

    If you select the Subscription billing method, you must specify the duration and specify 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: Specify a password after the instance is created. For more information, see Change or reset the password.

    • Now: Specify a password for the instance 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 specific special characters.

      • These special characters include

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

    Resource Group

    The resource group in which to create the instance.

  6. Click Buy Now.

  7. On the Confirm Order page, read the service agreement and select I have read and agree to ApsaraDB for Redis (Redis/Memcache) Agreement of Service, and then complete the payment.

Create a distributed instance by converting an ApsaraDB for Redis instance into the first child instance

  1. Log on to the ApsaraDB for Redis console.
  2. In the left-side navigation pane, click Global Distributed Cache.

  3. In the upper-left corner of the page, choose Create Instance > Create From Existing Instance.

  4. Select an instance to convert it into the first child instance of the distributed instance.

    转换分布式实例

    Parameter

    Description

    Region

    The region where the existing instance resides.

    Edition

    This parameter is set to Enterprise Edition and cannot be changed.

    Version

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

    Architecture Type

    • Standard: runs in a master-replica architecture, 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.

    • Read/Write Splitting: ensures high availability, high performance, and high flexibility. The read/write splitting architecture allows a large number of concurrent reads of hot data from read replicas. This reduces the loads on the master node and minimizes O&M costs.

    For more information, see Overview.

    Instance

    The instance that you want to convert into the first child instance of the distributed instance.

  5. Click OK.

    Note

    After the conversion is complete, the selected ApsaraDB for Redis instance becomes the first child instance of the distributed instance.

    You can view and manage this instance after you select the region where the instance resides on the Instances page in the ApsaraDB for Redis console. To view all distributed instances in the region, you can select Distributed Instance from the Instance ID/Name drop-down list on the Instances page and click Search.

What to do next

Add a child instance to a distributed instance