When you create a Tair instance, you must select the most cost-effective and stable instance type that can suit your performance, price, scenario, and workload needs. This topic describes the instance types, engine versions, architectures, and storage mediums of Tair to help you select instances.
Selection procedure
In most cases, you can select instance types and specifications based on your performance, price, scenario, and workload needs. For example, you may want to use instances as high-speed caches or in-memory databases. The following table describes the recommended selection procedure.
When you select an instance, you can use the price calculator to obtain the prices of different instance specifications. For more information, see Price calculator.
Operation | Description |
Select Redis Open-Source Edition or Tair (Enterprise Edition) | Tair (Redis OSS-compatible) provides Redis Open-Source Edition and Tair (Enterprise Edition). Tair (Enterprise Edition) is developed based on Alibaba Cloud Tair to provide higher performance, more data structures, and more flexible storage methods. |
We recommend that you select the cloud-native deployment mode. | |
Tair (Redis OSS-compatible) provides instances that use the standard architecture, cluster architecture, or read/write splitting architecture. You can select an architecture that suits your business data volume and your requirements for read and write capabilities and business performance. | |
An instance may fail for unexpected reasons, such as a device failure or a power failure in a data center. In this case, disaster recovery can help ensure data consistency and service availability. Tair (Redis OSS-compatible) provides a variety of disaster recovery solutions to meet the requirements of different business scenarios. | |
We recommend that you use the latest major version that is bundled with more features. | |
We recommend that you estimate the size of memory that is required. This reduces costs and prevents your business from being affected by frequent specification changes. | |
After you perform the preceding operations, you can create a Tair instance by using the console or by calling an API operation. | |
After you create and start to use a Tair instance, monitor the performance of the instance when your business is running as expected. This allows you to verify whether the instance meets your expectations. |
Select Redis Open-Source Edition or Tair (Enterprise Edition)
Tair (Redis OSS-compatible) provides Redis Open-Source Edition and Tair (Enterprise Edition). Tair (Enterprise Edition) is an enterprise-level, in-memory database service that is developed based on Alibaba Cloud Tair. Tair (Enterprise Edition) provides a variety of series of instances based on storage mediums such as dynamic random-access memory (DRAM), non-volatile memory (NVM), and Enterprise SSDs (ESSDs) to meet your requirements for low-latency access, persistence, and reduced overall costs. Tair (Enterprise Edition) provides higher performance, more data structures, and more flexible storage methods to meet your business requirements in different scenarios.
Tair (Enterprise Edition) supports all features of Redis Open-Source Edition. In addition, Tair (Enterprise Edition) provides advanced features, such as point-in-time data restoration by using data flashback, proxy query cache, and Global Distributed Cache. For more information about the comparison between Redis Open-Source Edition and Tair (Enterprise Edition), see Comparison between Tair (Enterprise Edition) and Redis Open-Source Edition.
For information about the commands and parameters supported by each series type, see Overview and Configure instance parameters.
Edition | Series type | Feature | Scenario |
Tair (Enterprise Edition) |
| Performance-centric business scenarios | |
| Data caching and storage scenarios that require high performance and high data persistence, and can bear high costs | ||
| Data storage scenarios that require a large capacity and low costs, involve only infrequent data access, and can bear high access latency | ||
Redis Open-Source Edition | N/A | Redis Open-Source Edition instances are compatible with open source Redis and provide high performance. | Standard Redis usage and data migration scenarios |
Select the cloud-native or classic deployment mode
The following table describes the comparison between the cloud-native deployment mode and the classic deployment mode.
Item | Cloud-native instance (recommended) | Classic instance |
Architecture | Uses a new-generation management architecture that provides greater flexibility and enhanced scalability. This architecture serves as a basis for subsequent development. | Uses the conventional management architecture. Cluster instances come with predefined specifications that cannot be changed. |
Scalability |
|
|
Select a deployment architecture
Tair (Redis OSS-compatible) supports three deployment architectures. You can select an architecture that suits your business data volume and your requirements for read and write capabilities and business performance.
The following table describes the high availability (HA) architectures. The standard and cluster architectures also support standalone instances without HA that are suitable for tests and cache-only use cases.
Instance architecture | Description | Scenario |
Standard instances adopt a master-replica architecture. The master node serves your workloads, and the replica node stays in hot standby mode to ensure HA. If the master node fails, the system switches the workloads to the replica node within 30 seconds after the failure occurs. This ensures the HA of your instance. |
| |
|
| |
|
Note Latency exists when data is synchronized to read replicas. Therefore, in scenarios that require high data consistency, we recommend that you use cluster instances instead of read/write splitting instances. |
Cluster instances are available in the following connection modes:
Proxy mode: Proxy nodes forward requests from clients to the data shards in your instance. This mode provides features such as load balancing, read/write splitting, failover, proxy query cache, and persistent connections. The proxy query cache feature is supported only for DRAM-based instances. For more information, see Features of proxy nodes.
Direct connection mode: You can bypass proxy nodes and directly connect to backend data shards of your instance in a similar manner as you connect to an open source Redis cluster. Compared with the proxy mode, the direct connection mode eliminates the need for the use of proxy nodes to process requests. This can accelerate the response speed of Tair to some extent.
Select a disaster recovery solution
Disaster recovery solution | Protection level | Description |
★★★☆☆ | The master node and the replica node are deployed on different machines in the same zone. If the master node fails, the HA system performs a failover to prevent service interruption caused by a single point of failure (SPOF). | |
★★★★☆ | The master node and the replica node are deployed in two different zones of the same region. If the zone in which the master node resides is disconnected due to force majeure factors such as a power or network failure, the HA system performs a failover to ensure continuous availability of the entire instance. | |
★★★★★ | In the architecture of Global Distributed Cache, a distributed instance consists of multiple child instances that synchronize data among each other in real time by using synchronization channels. The channel manager monitors the health status of child instances and handles exceptions that occur on child instances, such as a master-replica switchover. Global Distributed Cache is suitable for scenarios such as geo-disaster recovery, active geo-redundancy, nearby application access, and load balancing. For more information, see Overview of Global Distributed Cache for Tair. |
Select a major version
You can select a major version based on your business requirements. Each major version is maintained on a long-term basis. We recommend that you use a newer major version to support more features. For more information, see New features and compatibility changes of major versions of Redis.
You must consider the following limits when you select a major version.
Instance and its creation method | Supported instance edition and series type | Supported engine version | Supported architecture |
Cloud-native instance | Redis Open-Source Edition | Redis 7.0 Redis 6.0 Redis 5.0 | Standard architecture Cluster architecture Read/write splitting architecture |
Tair (Enterprise Edition) DRAM-based instance | Redis 7.0 Redis 6.0 Redis 5.0 | Standard architecture Cluster architecture Read/write splitting architecture | |
Tair (Enterprise Edition) persistent memory-optimized instance | Redis 6.0 | Standard architecture Cluster architecture Read/write splitting architecture | |
Tair (Enterprise Edition) ESSD/SSD-based instance | Redis 6.0 | Standard architecture | |
Classic instance | Redis Open-Source Edition | Redis 5.0 Redis 4.0 | Cluster architecture Standard architecture Read/write splitting architecture |
Tair (Enterprise Edition) DRAM-based instance | Redis 5.0 | Cluster architecture Standard architecture Read/write splitting architecture |
Estimate the memory size
To create an instance, you must estimate the size of memory required based on the following factors and select the most suitable memory specifications. This reduces costs, prevents your business from being affected by frequent specification changes, and allows you to migrate your business to the cloud at a faster pace.
When you determine the memory size of a Tair (Redis OSS-compatible) instance, you must first consider the volume of data that you want to store. In addition, you must take into account the memory required for the operation of the instance itself, such as the memory occupied by the process metadata, replication buffer, and fragments.
For self-managed Redis databases, you must consider the memory overhead caused by the write-time replication of forks and advanced features such as whitelist configuration, audit logging, large key management, and hotkey management. If you use Tair (Redis OSS-compatible) instances, the preceding memory overhead is borne by Alibaba Cloud and is not included in the memory size of the purchased instance.
The data types, lengths, and quantity of keys.
NoteIf a key, such as a key of the hash type, contains elements, you must consider the quantity and lengths of these elements.
The lengths of values.
The expiration time and eviction policy of each key.
The access model. For example, if the access model involves a large number of client connections, Lua scripts, or transactions, you must reserve memory for them.
Medium- and long-term business growth.
Create a Tair instance
After you determine the instance type and specifications, you can create a Tair instance by using the console or by calling an API operation. For more information, see the following topics:
Console: Create an instance
API operation: CreateInstance
Verify and adjust the instance capabilities
Tair (Redis OSS-compatible) supports a variety of metrics. After you create and start to use a Tair instance, we recommend that you monitor the performance of the instance when your business is running as expected. This allows you to check whether the instance type and specifications are suitable. For more information, see View performance monitoring data.
You can also use the redis-benchmark tool to perform a performance stress test. For more information, see Redis-benchmark instructions.
For example, if the performance monitoring data of an instance indicates high memory usage, check whether an anomaly exists. If no anomaly exists, upgrade the instance specifications. For more information, see Change the configurations of an instance. For more information about how to troubleshoot performance issues for instances, see the following topics: