Tair DRAM-based instances are suitable for scenarios that require high concurrency and involve large amounts of hot data. DRAM-based instances have multi-threading performance enhanced and a broad set of in-house enhanced data structures integrated.
Integration of multiple data modules
Tair DRAM-based instances can be used in scenarios such as live video streaming, flash sales, and online education. The following section describes typical scenarios:
Scenario 1: During flash sales, the number of QPS on some cached hotkeys may exceed 200,000. ApsaraDB for Redis Community Edition instances cannot meet this requirement.
Tair DRAM-based instances can efficiently process requests during these flash sales without performance issues.
Scenario 2: ApsaraDB for Redis Community Edition cluster instances have limits on database transactions and Lua scripts.
Tair DRAM-based instances provide high performance and eliminate the limits on the usage of commands in ApsaraDB for Redis Community Edition cluster instances.
Scenario 3: You have created a self-managed Redis instance that consists of one master node and multiple replica nodes. The number of replica nodes and O&M costs increase as your workloads increase.
Tair DRAM-based instances that use the read/write splitting architecture can provide one data node and up to five read replicas to help you handle millions of QPS.
Scenario 4: You have created a self-managed Redis cluster to handle tens of millions of QPS. The number of data shards and O&M costs increase as your workloads increase.
Tair DRAM-based instances can downsize clusters by two thirds and significantly reduce O&M costs.
Comparison between threading models
ApsaraDB for Redis Community Edition instances and native Redis databases adopt the single-threading model. During request handling, native Redis databases and ApsaraDB for Redis Community Edition instances must undergo the following steps: read requests, parse requests, process data, and then send responses. In this situation, network I/O operations and request parsing consume most of available resources.
To improve performance, each Tair DRAM-based instance runs on multiple threads to process the tasks in these steps in parallel.
Each DRAM-based instance reads and parses requests in I/O threads, places the parsed requests as commands in a queue, and then sends these commands to worker threads. Then, the worker threads run the commands to process the requests and send the responses to I/O threads by using a different queue.
A Tair DRAM-based instance can process up to four I/O threads in concurrency. Unlocked queues and pipelines are used to transmit data between I/O threads and worker threads to improve multi-threading performance.
The multi-threading model of Redis 6.0 consumes large amounts of CPU resources to deliver performance that is up to twice higher than that delivered by the single-threading model of a major version earlier than Redis 6.0. The Real Multi-I/O model of DRAM-based instances provides fully accelerated I/O threads to sustain a large number of concurrent connections and offer a linear increase in throughput.
ApsaraDB for Redis instances and native Redis databases adopt the single-threading model. In the single-threading model, each data node supports 80,000 to 100,000 QPS. Tair DRAM-based instances adopt the multi-threading model. The multi-threading model allows the I/O, worker, and auxiliary threads to process requests in parallel. Each data node of a DRAM-based instance delivers performance that is about three times that delivered by each data node of an ApsaraDB for Redis Community Edition instance. The following table describes ApsaraDB for Redis and Tair DRAM-based instances of different architectures and their use cases.
ApsaraDB for Redis
Tair DRAM-based instance
These instances are not suitable if the number of QPS that is required on a single node exceeds 100,000.
These instances are suitable if the number of QPS that is required on a single node exceeds 100,000.
A cluster instance consists of multiple data nodes. Each data node provides performance that is similar to that of a standard instance. If a data node stores hot data and receives a large number of concurrent requests for hot data, the read and write operations on other data that is stored on the data node may be affected. As a result, the performance of the data node deteriorates.
These instances provide high performance to read and write hot data at reduced maintenance costs.
Read /write splitting
These instances provide high read performance and are suitable for scenarios in which the number of read operations is larger than the number of write operations. However, these instances cannot support a large number of concurrent write operations.
These instances provide high read performance and can support a large number of concurrent write operations. These instances are suitable for scenarios in which a large number of write operations need to be processed but the number of read operations is larger than the number of write operations.
Integration of multiple data modules
Multiple data modules are integrated into Tair DRAM-based instances. This allows DRAM-based instances to support more scenarios. These modules include exString (including Commands that enhance Redis string functionality), exHash, GIS, Bloom, Doc, TS, Cpc, exZset, and Search. These modules simplify business development in complex scenarios and allow you to focus on your business innovation.
|Type||Extended data structure of Tair||Redis Stack Server||Description|
For information about the best practices, see Implement high-performance optimistic locking by using TairString and Implement bounded counters by using TairString.
A TairHash is a hash that allows you to specify the expiration time and version number for a field. TairHash is more flexible in use and simplifies application development in most scenarios. This data structure is open-sourced. For more information, see TairHash.
TairZset allows DOUBLE-typed scores to be sorted with respect to 256 dimensions. You can use TairZset to implement regular leaderboards and distributed leaderboards. The data structure is open-sourced. For more information, see TairZset.
For information about the best practices, see Implement multidimensional leaderboards by using TairZset and Implement distributed leaderboards by using TairZset.
TairDoc is compatible with RedisJSON, supports JSONPath and JSON Pointer syntax, and allows conversion from the JSON format to the XML or YAML format.
TairSearch uses syntax similar to that of Elasticsearch but provides more and better tokenizers to improve query performance.
For information about the best practices, see Accelerate queries with multi-column indexes by using TairSearch.
A TairGIS is a data structure that uses R-tree indexes and supports APIs related to a geographic information system (GIS). TairGIS allows points, linestrings, and polygons to be queried. You can use TairGIS to check whether A contains B, whether A is contained by B, or whether A intersects with B.
For information about the best practices, see Implement digital fences by using TairGIS.
Compared with RedisTimeSeries, TairTS extends the capability of tags. In TairTS, an extra hash layer is added to support your aggregate queries on timelines. You can also use TairTS to update or add data to historical time series data.
For information about the best practices, see Implement fine-grained monitoring by using TairTS.
TairBloom is compatible with RedisBloom, supports dynamic scaling, and provides 64-bit hash algorithms to significantly reduce the probability of collision for large amounts of data.
The best practices of TairBloom include the implementation of recommendation and crawler systems. For more information about the best practices, see Bloom.
TairCpc is a data structure developed based on the compressed probability counting (CPC) sketch. It allows you to perform high-performance computing on sampled data with a small amount of memory. TairCpc supports rolling and sliding windows to implement data streaming and common aggregation operators in big data analytics such as
TairRoaring is an efficient computing module and provides high stability to support multi-bit computing power and improve performance and space complexity.
For information about the best practices, see Select users by using TairRoaring.
|Vector||Vector||RedisSearch (vector similarity)|
TairVector is a self-developed data structure that provides high-performance real-time storage and retrieval of vectors.
After you enable the data flashback feature of Tair, Tair retains append-only file (AOF) backup data for up to seven days. During the retention period, you can specify a point in time that is accurate to the second to create an instance and restore the backup data at the specified point in time to the new instance.
After you enable the proxy query cache feature, the configured proxy nodes cache requests and responses for hotkeys. If the same requests are received from a client within the specified validity period, Tair retrieves the responses to the requests from the cache and returns the responses to the client. During this process, Tair does not need to interact with backend data shards.
Global Distributed Cache for Tair is an active geo-redundancy database system that is developed based on ApsaraDB for Redis. Global Distributed Cache 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.
Two-way data synchronization between Tair instances
Data Transmission Service (DTS) supports two-way data synchronization between Tair instances. For more information about DTS, see What is DTS? This synchronization solution is suitable for scenarios such as active geo-redundancy and geo-disaster recovery.
Q: What do I do if a client does not support the commands that are provided by new data structures?
A: You can define the commands that are provided by new data structures in your application code before you use the commands in your client. Alternatively, you can use Tair clients to invoke these data structures. For more information, see Overview and Extended data structures of ApsaraDB for Redis Enhanced Edition (Tair).