All Products
Search
Document Center

ApsaraDB for Redis:Step 1: Create an ApsaraDB for Redis instance

Last Updated:Mar 04, 2024

ApsaraDB for Redis is available in two editions: Community Edition and Enhanced Edition (Tair). ApsaraDB for Redis Enhanced Edition (Tair) provides three instance series types: DRAM-based instances, persistent memory-optimized instances, and ESSD-based instances. This topic describes how to create an ApsaraDB for Redis instance that suits your business requirements.

Prerequisites

  • An Alibaba Cloud account is created. For more information, see Sign up with Alibaba Cloud.

  • If you want to create a pay-as-you-go instance, make sure that you have sufficient balance within your account.

Create an ApsaraDB for Redis cloud disk-based instance

  1. Go to the ApsaraDB for Redis buy page.

  2. Configure the Billing Method parameter.

    • 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.

      Note

      Resource plans are unavailable for cloud disk-based instances.

  3. Configure the parameters described in the following table.

    Parameter

    Description

    Region

    The region in which you want to create the instance. The region cannot be changed 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 ApsaraDB for Redis 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 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 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. To minimize the network latency between an Elastic Compute Service (ECS) instance and an ApsaraDB for Redis instance that are deployed in the same zone, connect the instances over an internal network.

    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 by 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 ApsaraDB for Redis instance is created in the same VPC as the ECS or ApsaraDB RDS instance to which you want to connect. Otherwise, the ECS or ApsaraDB RDS instance cannot access the ApsaraDB for Redis instance over the internal network.

    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.

    Instance Type

    • High availability: uses a master-replica architecture. The master node serves your workloads, whereas the replica node stays in hot standby mode to ensure high availability. If the master node fails, the system fails the workloads over to the replica node within 30 seconds after the failure occurs. This ensures the high availability of your instance.

    • Standalone: contains only a single data node. No replica nodes are provided to synchronize data in real time. Standard standalone instances are suitable for cache-only scenarios that do not require high data reliability. Standard standalone instances are available at a relatively low price.

    Version

    The database engine version of the instance. We recommend that you select a later engine version that has more features.

    Architecture

    • Non-cluster: uses the master-replica or read/write splitting architecture. For more information, see Standard master-replica instances or Read/write splitting instances.

      Select whether to enable Read/Write Splitting.

      • If you disable Read/Write Splitting, the instance uses the standard master-replica architecture.

      • If you enable Read/Write Splitting, the instance uses the read/write splitting architecture. In this case, you must specify the Nodes parameter. Valid values: 2 to 6. A value in this range includes a master node. Up to five read replicas are supported.

    • Cluster: uses the sharded cluster architecture. For more information, see Cluster master-replica instances.

      If you select Cluster, you must perform the following operations:

      • Set the Connection Mode parameter to one of the following values:

        • Proxy: uses proxy nodes to enable architecture changes, route commands, balance loads, and perform failovers. The connection mode offers several advantages, including aggregated connections, enhanced read performance, and ease of use. This can help you design more efficient business systems. For more information, see Features of proxy nodes.

        • Direct Connection: allows you to directly connect to the instance in the same manner as you connect to open source Redis.

        Important

        After the instance is created, you cannot change the connection mode for the instance. You can select only a single connection mode for your instance. We recommend that you evaluate your use scenario in advance and select the connection mode that suits your business requirements.

      • Specify Shards. The instance performance increases with the number of shards. You can calculate the instance capacity by using the following formula: Instance capacity = Number of shards × Shard specifications. You can select 2 to 128 shards when you create an instance. After you create the instance, you can add more shards to the instance. For more information, see Adjust the number of shards for an instance.

      Note

      Instances of specific editions or engine versions do not support the cluster architecture or the proxy mode. The parameters displayed in the console prevail.

    Shard Specifications

    The shard specifications of the instance. A standard instance contains only a single shard. Each option contains a group of configurations, such as the memory capacity, maximum number of concurrent connections, and maximum bandwidth. For more information, see Specifications of ApsaraDB for Redis Community Edition cloud-native instances.

    Note

    Database metadata is generated when an 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 on a cluster instance equals the total size of metadata on all shards of the cluster instance.

    Read Replicas

    The number of read replicas, which is automatically changed along with the number of nodes.

    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: ! @ # $ % ^ & * ( ) _ + - =

    Instance Name

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

    Note

    The name must be 2 to 80 characters in length and must start with a letter. It cannot contain spaces or the following special characters: @ / : = " < > { [ ] }

    Validity Period

    The subscription duration of the instance.

  4. Click Buy Now.

  5. On the Confirm Order page, read and select the ApsaraDB for Redis terms of service, and then follow the instructions to pay for the instance.

    After you complete the payment, wait for 1 minute to 5 minutes. To view the created instance, you can select the region in which the instance resides on the Instances page of the ApsaraDB for Redis console.

Create a local disk-based instance

  1. Go to the ApsaraDB for Redis buy page.

  2. Configure the Billing Method parameter.

    • 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.

  3. Configure the parameters described in the following table.

    Parameter

    Description

    Region

    The region in which you want to create the instance. The region cannot be changed 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 ApsaraDB for Redis 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 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 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 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 by 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 VPC is an isolated network that provides higher security and better performance than the traditional classic network.

    Important

    Make sure that the ApsaraDB for Redis 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 ApsaraDB for Redis instance over the internal network.

    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

    • Community Edition: This edition is compatible with the open source Redis protocol and provides high performance.

    • Enterprise Edition (Tair): This edition is developed based on ApsaraDB for Redis Community Edition. This edition is optimized in terms of performance, storage mediums, and data modules. For more information, see Overview.

    Series

    The series type of the instance. This parameter is available only if the Edition parameter is set to Enterprise Edition (Tair). This parameter can be set only to Performance-enhanced. This series type uses the multi-threading model. The performance of an instance of this series type is three times that of a Community Edition instance that has the same specifications. This series type also provides multiple enhanced data modules to simplify development. For more information, see DRAM-based instances.

    Version

    The database engine version of the instance. We recommend that you select a later engine version that has more features.

    Architecture Type

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

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

    • Read/Write Splitting: ensures high availability (HA) and high performance, and supports multiple types of specifications. 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 in the cluster instance. This parameter is required only if the Architecture Type parameter is set to Cluster.

    Data is distributed across the shards.

    Node Type

    • The node type of the instance. If you set the Architecture Type parameter to Cluster or Standard, you can set this parameter only to Master-Replica.

    • If you set the Architecture Type parameter to Read/Write Splitting, you can select the node type based on the number of read replicas that you want to create.

    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 Overview.

    Note

    Database metadata is generated when an 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 on a cluster instance equals the total size of metadata on all shards of the cluster instance.

    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: ! @ # $ % ^ & * ( ) _ + - =

    Instance Name

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

    Note

    The name must be 2 to 80 characters in length and must start with a letter. It cannot contain spaces or the following special characters: @ / : = " < > { [ ] }

    Quantity

    The number of instances that you want to create. The instances have the same specifications. You can create up to 99 instances at a time.

    Subscription Duration

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

    Resource Group

    The resource group to which you want to assign the instance. For more information, see What is Resource Management?

  4. Click Buy Now.

  5. On the Confirm Order page, read and select the ApsaraDB for Redis terms of service, and then follow the instructions to pay for the instance.

    After you complete the payment, wait for 1 minute to 5 minutes. To view the created instance, you can select the region in which the instance resides on the Instances page of the ApsaraDB for Redis console.

Create an ApsaraDB for Redis Enhanced Edition (Tair) cloud disk-based instance

For more information, see Create a Tair instance.

FAQ

  • How long does it take to create an instance?

    The amount of time that is required to create an instance is directly proportional to the number of shards in the instance. A larger number of shards require more resources. As a result, it takes longer to create the instance. For example, it can take 2 to 3 minutes to create a standard master-replica instance, 10 to 15 minutes to create a 128-shard cluster master-replica instance, and 20 to 40 minutes to create a 256-shard cluster master-replica instance.

    Note
    • A standard instance is regarded as a single-shard instance.

    • The master node of a read/write splitting instance is regarded as a shard that processes both read and write requests. Each read replica of a read/write splitting instance is regarded as a shard that processes only read requests.

  • Why am I unable to find the created instance?

    The following table describes the possible causes and solutions.

    Possible cause

    Solution

    The region that you selected in the ApsaraDB for Redis console is not the region in which the instance is deployed.

    Log on to the ApsaraDB for Redis console and select the region in which the instance is deployed.

    The instance list in the ApsaraDB for Redis console is not updated or is updated before the instance is created.

    Wait for a few minutes and then update the instance list to check whether the instance is displayed in the list.

  • Why am I refunded for an instance that I just created?

    The system may fail to create the instance due to insufficient resources. In this case, your payment is refunded. You can check your refund on the Orders page. After you confirm that the payment is refunded, you can attempt to create an instance in another zone.

  • Why am I unable to create a standalone ApsaraDB for Redis instance?

    Standalone instances were phased out on December 19, 2019. For more information, see Deprecated standalone instances.

Related API operations

API operation

Description

CreateInstance

Creates an ApsaraDB for Redis instance.

CreateTairInstance

Creates a Tair cloud disk-based instance.