Limits

更新时间:
复制 MD 格式

Tair (Redis OSS-compatible) imposes the following limits on data types, instance configuration, and runtime behavior.

Data type limits

The four core Redis data types share the same element size limit and performance thresholds.

Data typeMax element sizeRecommended max elementsRecommended max collection size
LIST512 MB8,1921 MB
SET512 MB8,1921 MB
Sorted Set512 MB8,1921 MB
HASH512 MB8,1921 MB

The number of collections and the number of elements per collection are unlimited.

Keep collections within the recommended thresholds (fewer than 8,192 elements, total size under 1 MB) to avoid noticeable increases in memory and CPU overhead.

Instance limits

Databases

Each instance supports up to 256 databases.

The total data size across all databases is bounded by the instance memory. The system allocates memory to each database dynamically based on usage — a single database can consume up to the full instance memory if no other database holds data.

Supported Redis commands

For the full list of supported commands, see Supported Redis commands.

Runtime behavior

Expired key deletion

Tair removes expired keys using two complementary mechanisms:

  • Background scan: A background process periodically scans and deletes expired keys.

  • Lazy deletion: When a client accesses an expired key, the system deletes it immediately.

A key may remain in memory briefly after its TTL expires until the next background scan runs or a client access triggers deletion.

Idle connection handling

Tair does not automatically close idle connections. Manage connection lifecycle in your application — for example, use a connection pool with an idle timeout.

Data persistence

Tair uses the AOF_FSYNC_EVERYSEC policy, which runs fsync once per second via the Append-Only File (AOF) mechanism. This balances durability and write performance.

Monitoring and alerting

Configure monitoring and alerting in the CloudMonitor console. For setup instructions, see Alert settings.

Set alerts for the following metrics to detect issues early:

  • Instance failures

  • Instance failover

  • Connection usage

  • Failed operations

  • Capacity usage

  • Write bandwidth usage

  • Read bandwidth usage