ApsaraDB for Redis has two editions: Community Edition and Enhanced Edition (Tair). ApsaraDB for Redis Enhanced Edition (Tair) provides three series types: performance-enhanced instances, persistent memory-optimized instances, and storage-optimized instances. This topic describes how to create an ApsaraDB for Redis instance.

Prerequisites

  • An Alibaba Cloud account is created. For more information about how to create an Alibaba Cloud account, 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.

Select a series type and specifications

Before you create an ApsaraDB for Redis instance, you must select a series type and specifications based on various factors, such as performance, price, and workload. For more information, see Select ApsaraDB for Redis instances.

Create an ApsaraDB for Redis instance that uses local disks

  1. Go to the Instances page of the ApsaraDB for Redis console.
  2. In the upper-left corner of the page, click Create Instance.
  3. On the buy page, select Redis (Local Disk, Including Tair) for Product Type.
  4. Select a billing method.
    • Subscription: You must pay for the instance when you create it. For long-term use, the subscription billing method is more cost-effective than the pay-as-you-go billing method. You are charged lower prices for longer subscription periods.
    • 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 need a pay-as-you-go instance, you can release the instance to reduce costs.
  5. 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.
    • To enable connections over the 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 ApsaraDB for Redis instance 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 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. All of the zones in a region provide the same level of service performance. If some ECS instances are used to access an ApsaraDB for Redis instance, the instance that is deployed in the same zone as the ECS instances can be accessed at a slightly lower latency compared with the instance that is deployed in a different zone as the ECS instances.
    Note If you set the Deployment Type parameter to Dual-zone deployment, you must also specify the Secondary Zone parameter to a zone that is different from the zone specified by the Primary Zone parameter. The primary zone and secondary zone 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.

    Notice To enable connections over the 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.
    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 available in the VPC in the current zone, create a vSwitch. For more information, see Work with vSwitches.
    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 medium, and data structures. For more information, see Overview.
    Series The series type of the instance. This parameter is supported only if the Edition parameter is set to Enhanced Edition (Tair). This parameter can be set only to Performance-enhanced. This series type uses the multi-threading model. The performance of a performance-enhanced instance of the Enhanced Edition (Tair) is three times that of a Community Edition instance with the same specifications. This series type also provides multiple data structure modules to simplify development. For more information, see Performance-enhanced 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 the performance bottleneck that is caused by the single-threading model. You can use the high-performance cluster instance to process large-capacity workloads.
    • Standard: runs in a master-replica architecture, provides high-performance caching services, and ensures high data reliability.
    • Read/Write Splitting: ensures high availability (HA) and high performance and supports multiple 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 for the cluster instance. Data is distributed across the shards in the cluster instance.
    Note This parameter is supported only if the Architecture Type parameter is set to Cluster.
    Node Type
    • The node type of the instance. If you set the Architecture Type parameter to Cluster or Standard, this parameter can be set 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.
    Instance Class The specifications of the instance. Each option contains a group of configurations, such as the memory capacity, maximum number of concurrent connections, and maximum bandwidth. For more information, see Overview.
    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 for a cluster instance equals the total size of metadata on all shards of the cluster instance.
    Set Password
    • The time when you want to set the 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 specific special characters.
      • These special characters include ! @ # $ % ^ & * ( ) _ + - =
    Instance Name The name of the instance, which is used to identify and manage the instance.
    Note The name must be 2 to 80 characters in length and must start with a letter. It cannot contain spaces or specific special characters. These special characters include @ / : = " < > { [ ] }
    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 If you select the Subscription (Local Disk, Including Tair) product type, 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?.
  6. Click Buy Now.
  7. On the Confirm Order page, read and select the ApsaraDB for Redis Agreement of Service and follow the instructions to pay for the instance.
    After your payment is complete, wait for 1 to 5 minutes. To view the created instance, you can select the region where the instance resides on the Instances page of the ApsaraDB for Redis console.

Create an ApsaraDB for Redis Enhanced Edition (Tair) instance that uses cloud disks

  1. Go to the Instances page of the ApsaraDB for Redis console.
  2. In the upper-left corner of the page, click Create Instance.
  3. On the buy page, select Tair (Cloud Disk) for Product Type.
    Note Only the subscription billing method is supported for this product type. In this billing method, you must pay when you create the instance.
  4. Configure the parameters described in the following table.
    Parameter Description
    Types
    • The series type of the instance. Tair Extreme Performance: uses the multi-threading model. The performance of a performance-enhanced instance of the Enhanced Edition (Tair) is three times that of a Community Edition instance with the same specifications. This series type also provides multiple data structure modules to simplify development. For more information, see Performance-enhanced instances.
    • Tair Persistent Memory: allows users to store and query data in persistent memory. This instance type provides command-level persistence capabilities. It is suitable for scenarios that require high performance and data consistency. For more information, see Persistent memory-optimized instances.
    • Tair Massive Storage: allows users to store and query data in enhanced SSDs (ESSDs). This instance type provides command-level persistence capabilities and large storage capacities. It is suitable for scenarios that require moderate performance and low costs. For more information, see Storage-optimized instances.
    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.
    • To enable connections over the 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 ApsaraDB for Redis instance 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 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 that are known as zones. Each zone has its own independent power supply and network. To minimize the network latency between an ECS instance and an ApsaraDB for Redis instance that are deployed in the same zone, connect them over the internal network.

    Note If you set the Deployment Type parameter to Dual-zone, you must also specify the Secondary Zones parameter to a zone that is different from the zone specified by the Primary Zone parameter. The primary zone and secondary zone 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.
    Notice 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. ECS instances located in other regions can access the ApsaraDB for Redis instance only over the Internet.
    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 available in the VPC in the current zone, create a vSwitch. For more information, see Work with vSwitches.
    Architecture
    • Standalone: uses the master-replica architecture. For more information, see Standard master-replica instances.
    • 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. Default value: Proxy. After the instance is created, the connection mode cannot be changed.
        • Proxy: uses proxy nodes to enable architecture changes, route commands, balance loads, and perform failovers. The connection mode can aggregate connections and enhance read performance. In addition, this mode is easy to use and simplifies your business system. 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.
      • Specify the number of shards. The instance performance increases with the number of shards. You can calculate the instance capacity with the following formula: Instance capacity = Number of shards × Shard specifications.
    Note Storage-optimized instances do not support the cluster architecture.
    Shard Specification The specifications of the instance. Each option contains a group of configurations, such as the memory capacity, maximum number of concurrent connections, and maximum bandwidth. For more information, see Overview.
    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 on a cluster instance equals the total size of metadata on all shards of the cluster instance.
    Replicas This parameter can be set only to 2. Each shard has a master node and a replica node to ensure HA.
    Storage Space The storage capacity of the instance. If you set the Types parameter to Tair Massive Storage, you can select the storage capacity based on your business requirements.

    The Storage Class parameter can be set only to ESSD PL1. For more information about Alibaba Cloud ESSDs at performance level 1 (PL1), see ESSDs.

    Note If you set the instance series type to Tair Extreme Performance or Tair Persistent Memory, the Storage Space and Storage Class parameters are unavailable.
    Password Setting
    • The time when you want to set the 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 specific special characters.
      • These special characters include ! @ # $ % ^ & * ( ) _ + - =
    Instance Name The name of the instance, which is used to identify and manage the instance.
    Note The name must be 2 to 80 characters in length and must start with a letter. It cannot contain spaces or specific special characters. These special characters include @ / : = " < > { [ ] }
    Subscription Duration The subscription duration of the instance.
    Resource Group The resource group to which you want to assign the instance. For more information, see What is Resource Management?.
  5. Click Buy Now.
  6. On the Confirm Order page, read and select the ApsaraDB for Redis Agreement of Service and follow the instructions to pay for the instance.
    After your payment is complete, wait for 1 to 5 minutes. To view the created instance, you can select the region where the instance resides on the Instances page of the ApsaraDB for Redis console.

Create an ApsaraDB for Redis instance that uses cloud disks

  1. Go to the Instances page of the ApsaraDB for Redis console.
  2. In the upper-left corner of the page, click Create Instance.
  3. On the buy page, select Redis (Cloud Disk) for Product Type.
    Note Only the subscription billing method is supported for instances that use cloud disks. In this billing method, you must pay when you create the instance.
  4. 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.
    • To enable connections over the 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 ApsaraDB for Redis instance 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 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 that are known as zones. Each zone has its own independent power supply and network. To minimize the network latency between an ECS instance and an ApsaraDB for Redis instance that are deployed in the same zone, connect them over the internal network.
    Note If you set the Deployment Type parameter to Dual-zone, you must also specify the Secondary Zones parameter to a zone that is different from the zone specified by the Primary Zone parameter. The primary zone and secondary zone 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.
    Notice 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. ECS instances located in other regions can access the ApsaraDB for Redis instance only over the Internet.
    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 available in the VPC in the current zone, create a vSwitch. For more information, see Work with vSwitches.
    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 architecture. For more information, see Standard master-replica instances.
    • 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. Default value: Proxy. After the instance is created, the connection mode cannot be changed.
        • Proxy: uses proxy nodes to enable architecture changes, route commands, balance loads, and perform failovers. The connection mode can aggregate connections and enhance read performance. In addition, this mode is easy to use and simplifies your business system. 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.
      • Specify the number of shards. The instance performance increases with the number of shards. You can calculate the instance capacity with the following formula: Instance capacity = Number of shards × Shard specifications.
      Note Instances of specific editions or engine versions do not support the cluster architecture or the proxy connection mode. The specific limits are displayed in the console.
    Shard Specifications The 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 Community Edition with cloud disks.
    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 on a cluster instance equals the total size of metadata on all shards of the cluster instance.
    Replicas This parameter can be set only to 2. Each shard has a master node and a replica node to ensure HA.
    Set Password
    • The time when you want to set the 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 specific special characters.
      • These special characters include ! @ # $ % ^ & * ( ) _ + - =
    Instance Name The name of the instance, which is used to identify and manage the instance.
    Note The name must be 2 to 80 characters in length and must start with a letter. It cannot contain spaces or specific special characters. These special characters include @ / : = " < > { [ ] }
    Validity Period The subscription duration of the instance.
  5. Click Buy Now.
  6. On the Confirm Order page, read and select the Tair Agreement of Service and follow the instructions to pay for the instance.
    After your payment is complete, wait for 1 to 5 minutes. To view the created instance, you can select the region where the instance resides on the Instances page of the ApsaraDB for Redis console.

FAQ

  • Q: How long does it take to create an instance?

    A: The amount of time that is required to create an instance depends on the number of shards in the instance. A larger number of shards requires more resources. As a result, it takes longer to create the instance. For example, it takes 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.
  • Q: Why am I unable to find the created instance?

    A: The following table describes the possible causes and solutions.

    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 a few minutes and then update the instance list to check whether the instance is displayed in the list.
  • Q: Why am I refunded for an instance that I just created?

    A: 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 try to create your instance in another zone. You can also submit a ticket for technical help.

  • Q: Why am I unable to create an ApsaraDB for Redis standalone instance?

    A: Standalone instances have been phased out as of December 19, 2019. For more information, see Deprecated standalone instances.

Related API operations

API Description
CreateInstance Creates an ApsaraDB for Redis instance.
CreateTairInstance Creates a persistent memory-optimized or storage-optimized instance of the ApsaraDB for Redis Enhanced Edition (Tair).