All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Tair extended data structures

Last Updated:Jun 19, 2026

Like open-source Redis, Tair (Redis OSS-compatible) supports standard data types such as String, List, Hash, Set, Sorted Set, and Stream. While sufficient for many use cases, these types can fall short in complex business scenarios that require extensive custom code or complex Lua scripts. To address this, Tair (Enterprise Edition) integrates a suite of proprietary data structures. These include exString (which includes Redis String command enhancement), exHash, exZset, GIS, TairBloom, Doc, TS, Cpc, Roaring, TairSearch, and Vector. They expand the capabilities of Redis, reduce development complexity for advanced applications, streamline your code, and improve overall business performance, allowing you to focus on innovation.

Note

Tair extended data structures and Redis Stack modules

The following table describes the data structures integrated into Tair and compares their features with those of Redis Stack Server.

Type

Tair extended data structure

Redis Stack Server

Description

String enhancement

None

  • exString is a string data structure that includes a version number. It enhances the standard Redis String increment and decrement functions by allowing you to set boundaries for the results of the INCRBY and INCRBYFLOAT commands. If a result exceeds the defined range, an error is returned. This data structure is open source. For more information, see TairString.

  • The CAS and CAD commands enable the simple and efficient implementation of a high-performance distributed lock.

Best practices: Implement high-performance optimistic locking by using TairString and Implement an efficient rate limiter by using TairString.

Hash enhancement

exHash

None

exHash allows you to set a time-to-live (TTL) and a version for individual fields within a hash. This enhances the flexibility of the Hash data structure and simplifies development for many use cases. This data structure is open source. For more information, see TairHash.

Best practice: Manage multi-device user logon by using TairHash.

Zset enhancement

exZset

None

exZset supports sorting scores of type double across 256 dimensions, enabling both standard and multi-dimensional leaderboards. This data structure is open source. For more information, see TairZset.

Best practices: Easily implement multi-dimensional leaderboards by using exZset and Implement distributed leaderboards by using exZset.

Geospatial

GIS

None

TairGIS is a data structure that uses an R-tree for indexing and supports APIs for geographic information systems (GIS). It supports queries for points, linestrings, and polygons, and relationship checks such as contains, within, and intersects. This data structure is open source. For more information, see TairGIS.

Best practices: Implement geofencing by using TairGIS and Implement a local shopping service by using TairGIS.

Doc (JSON)

Doc

RedisJSON

TairDoc is a document-type data structure that supports the JSON standard, similar to the RedisJSON module. TairDoc stores data in a binary tree format, which allows for fast access to sub-elements within a JSON object.

Search

TairSearch

RediSearch

TairSearch provides an Elasticsearch-like (ES-like) query syntax, a wider range of accurate tokenizers, and superior query performance.

Time series

TS

RedisTimeSeries

Compared to RedisTimeSeries, TairTS offers greater tag scalability. It supports a two-level hash structure for timelines based on skeys (tags), enables aggregate queries on the secondary timeline, and allows you to update or append data to historical time series.

Best practice: Implement second-level monitoring by using TairTS.

Sketches

TairBloom

RedisBloom

TairBloom is compatible with RedisBloom and supports dynamic scaling. It uses a 64-bit hash algorithm to reduce hash collisions, significantly lowering the collision rate for large datasets.

Best practices: Ideal for recommendation systems and crawler systems. For more information, see TairBloom and Efficiently manage game event push notifications by using a Bloom filter.

Cpc

None

TairCpc is a data structure developed based on the Compressed Probability Counting (CPC) sketch algorithm. It performs high-performance calculations on sampled data while using minimal memory. TairCpc supports both tumbling and sliding windows for better stream processing and includes common aggregation operators used in big data analytics, such as DISTINCT, COUNT, MAX, MIN, FIRST, LAST, and SQUARED.

Bitmap

Roaring

None

TairRoaring provides an efficient and highly stable computing module. It supports operations on multiple bitmaps, which improves performance and space efficiency.

Best practice: Implement user cohort selection by using TairRoaring.

vector search

Vector

Redis Search (Vector Similarity)

TairVector is a proprietary extended data structure developed by Tair. It provides a high-performance, real-time vector database service that integrates storage and retrieval.

Best practices:

Tair (Enterprise Edition) clients

To simplify using Tair extended data structures, Tair has developed Tair clients based on several popular Redis clients. You can use these Tair clients to directly access Tair extended data structures.

You can find the following clients on GitHub. The repositories also include example code.

Tair client

Programming language

Description

TairJedis

Java

A Tair client built on Jedis.

AlibabaCloud.TairSDK

.NET

A Tair client built on .NET Core 5.0 and StackExchange.Redis 2.5.61.

Tair-go

Go

A Tair client built on go-redis.

Tair-py

Python

A Tair client built on redis-py.

FAQ

  • Q: Does Tair (Redis OSS-compatible) support Redis Stack Server?

    A: Due to Redis's open source license restrictions, neither Alibaba Cloud's Redis Open-Source Edition nor Tair (Enterprise Edition) supports Redis Stack Server.

    To address this, Tair (Enterprise Edition) provides its own proprietary extended data structures, including exString (which includes Redis String command enhancement), exHash, exZset, GIS, TairBloom, Doc, TS, Cpc, Roaring, TairSearch, and Vector. Tair supports a wider range of data structures than Redis Stack Server and offers better performance for some of them.

  • Q: How do I set a time-to-live (TTL) for Tair extended data structures?

    A: For exString, exHash, and Cpc, you can set the TTL directly with their specific commands. For other Tair extended data structures, set the key's TTL with the EXPIRE | EXPIREAT <Keyname> command, such as EXPIRE foo 60.

  • Q: How can I check which extended data structures my instance supports?

    A: The supported extended data structures depend on the instance edition and type. Log on to the Tair console and go to the Instance Details page to check your instance's edition (Redis Open-Source Edition or Tair (Enterprise Edition)) and type. Then, refer to the following list to determine which structures are supported:

    • Redis Open-Source Edition: Supports only standard Redis commands and does not support Tair extended data structures.

    • in-memory type: Support varies by the Redis compatibility version. Instances compatible with Redis 7.0 and 6.0 support all Tair extended data structures, while instances compatible with Redis 5.0 do not support Vector.

    • persistent memory type: Supports only exString (including Redis String command enhancement), exHash, and Cpc.

    • disk-based type: Does not support Tair extended data structures.