tencent cloud

Tencent Cloud Distributed Cache (Redis OSS-Compatible)

Cluster Architecture

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-09-07 17:42:42
AI 번역 및 품질 검수 완료

Architecture Overview

The cluster architecture is a distributed cache architecture built on the community edition of Redis Cluster. It is compatible with Redis 4.0, 5.0, 6.2, 7.0, and Valkey 8.0 and later protocol versions. The system uses a distributed sharding design and supports horizontal scaling from 1 to 128 shards and vertical scaling from 1 to 5 replicas, delivering high performance of tens of millions of QPS. Capacity expansion, scale-in, and migration processes are nearly transparent to business, ensuring high service availability. For specific performance data, see Specifications and Performance.

Core Components

Component
Description
Shard
The smallest logical unit of distributed storage. A cluster allocates 16,384 hash slots to shards. Each shard consists of one master node and multiple replica nodes, stores data for the corresponding slots, and supports online data balancing and dynamic migration.
Master node
The core node in a shard that handles read/write requests. Each shard has exactly one master node, which handles data writes and synchronizes them to its replica nodes in real time.
Replica node
A node in a shard that ensures data redundancy and high availability. It synchronizes data from the master node in real time. When the master node fails, the system automatically promotes one of the replica nodes to the new master node.
Proxy cluster
A built-in proxy component receives client requests and routes them to the corresponding shards. It provides load balancing, read/write separation, and cross-shard command processing capabilities while hiding cluster topology details. For details about Proxy routing rules, command compatibility, and connection limits, see Proxy Features.

Implementation Introduction

The instance provides a unified virtual IP address access address (VIP:Port) externally. Clients can connect directly using standard Redis clients such as redis-cli, Jedis, and Lettuce. The built-in Proxy component parses commands and routes them to the corresponding shards by slot. Proxy supports aggregated processing of some cross-slot commands and transparently handles topology changes such as scale-out, scale-in, and failover, requiring no awareness from the business side.


Connection Example

The cluster architecture connection mode supports mainstream multilingual Redis clients in the industry. The following table lists the recommended clients for each development language and the connection classes used in proxy mode. Click a language to navigate to detailed connection examples. For general instructions on preparations before connection, authentication methods, and connection verification, see Connection Preparation.
Development Language
Recommended Client
Recommended Edition
Connection Class
Connection Example
Java
Jedis
5.1.2 or later
JedisPool
Java
Lettuce
6.3.0 or later
RedisClient
Python
redis-py
Latest stable version
redis.Redis
Go
go-redis
v9
redis.NewClient
Node.js
node-redis / ioredis
Latest stable version
createClient / new Redis()
PHP
phpredis
5.0 or later
Redis
C
hiredis
Latest stable version
redisConnect
.Net
StackExchange.Redis / ServiceStack.Redis
Latest stable version
ConnectionMultiplexer

Shard and Replica Configuration

A larger number of shards provides higher capacity and performance. All shards participate in data storage and request processing. When the number of shards is greater than or equal to 1, data is automatically distributed based on hash slots, enabling horizontal scaling of storage capacity and throughput.
A larger number of replicas provides higher availability. All replica nodes participate in high-availability failover. When the number of replicas is greater than or equal to 1, you can enable the read/write separation feature to vertically scale read performance. For more information, see Read/Write Separation.
Note:
Commands that span multiple hash slots have certain compatibility limitations. For details, see Command Reference Overview.
Configuration Item
Optional Specifications
Shard specifications (GB):
1,2,4,8,12,16,20,24,32,40,48,64GB
Shard quantity
1, 3, 5, 8, 12, 16, 24, 32, 40, 48, 64, 80, 96, and 128
Replica quantity
1, 2, 3, 4, and 5

Upper Limits of Specifications

Item
Upper Limit
Description
Total storage capacity
8TB
128 shards × 64 GB/shard
Concurrent performance
Tens of millions of QPS
Tencent Cloud conducts multiple stress tests in standard testing environments and uses stable values as official references. For details, see Specifications and Performance.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백