tencent cloud

Tencent Cloud Distributed Cache (Redis OSS-Compatible)

Release Notes and Announcements
Release Notes
Announcements
User Tutorial
Product Introduction
Overview
Product Strengths
Use Cases
Storage Engine
Product Series
Product Versions
Specifications and Performance
Read/Write Separation
Multi-AZ Deployment
Regions and AZs
Terms
Service Regions and Service Providers
Purchase Guide
Billing Overview
Pricing Center
Instance Purchasing
Renewal (Yearly/Monthly Subscription)
Refund (Yearly/Monthly Subscription)
Overdue Payments
Switching from Pay-as-You-Go to Yearly/Monthly Subscription
Getting Started
Quickly Creating an Instance
Connecting to Redis Instance
Operation Guide
Operation Overview
Connecting to a Database Instance
Managing Instances
Upgrade Instance
Management Node (Redis/ValKey Edition)
Multi-AZ Deployment Management
Backup and Restoration
Managing Accounts
Parameter Configuration
Slow Query
Access Management
Network and Security
Monitoring and Alarms
Event Management (Redis/ValKey Edition)
Data Migration
Global Replication for Redis Edition
Database Audit
Performance Optimization
Sentinel Mode
Development Guidelines
Naming Rules
Basic Usage Guidelines
Design Principles of Key and Value
Command Usage Guidelines
Design Principles of Client Programs
Connection Pool Configuration
Command Reference
Command Reference Overview
Redis Edition and Valkey Edition Command Compatibility
Version Command Usage Differences
Differences Between the Proxy Architecture and Direct Connection Mode
More Command Operations (Redis/Valkey Edition)
Memcached Edition Command Compatibility
Practical Tutorial
Building TencentDB for Redis® Client Monitoring Based on Spring Boot
Redis Client Connection Configuration Policy and Practice
Global SCAN Guide for Cluster Architecture
Eliminating Instances Securely
Hot Key and Big Key
AZ Migration Scheme
Troubleshooting
Connection Exception
Exception Analysis and Solution of Redisson Client Timeout Reconnection
Performance Troubleshooting and Fine-Tuning
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Parameter Management APIs
Other APIs
Backup and Restoration APIs
Region APIs
Monitoring and Management APIs
Log APIs
Data Types
Error Codes
FAQs
General
Connection and Login
Purchase
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

Replica is read-only

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-03-17 17:45:57

Scenarios

For business scenarios with more reads than writes, Tencent Cloud Distributed Cache supports directing read requests for hot datasets to replica nodes, that is, read-only replicas. This routes read and write operations to different database nodes, avoiding read/write conflicts, improving database concurrency, and enhancing overall system performance and stability. For more information, see Read/Write Separation.

Billing

The read-only replica feature is currently available for free trial.

Support Notes

Storage Engine
Supported Version
Supported Architecture
Redis Edition
4.0 or later
Standard architecture and cluster architecture
Valkey Edition
8.0
Standard architecture and cluster architecture
Memcached Edition
Not supported

Must-Knows

Enabling the read-only replica feature of read/write separation may cause data read inconsistency (replica node data lags behind the primary node). Please first confirm whether the business allows data inconsistency issues.
The read-only replica switch only affects new connections; existing connections remain unaffected.

Prerequisites

Database version requirements: Redis 4.0 or later, ValKey 8.0.
The instance status is Running.

Enabling Replica Read-Only Mode

2. At the upper part of the Instance List page on the right, select a region.
3. In the instance list, find the target instance.
4. Click the Instance ID to go to the Instance Details page, and then click the Node Management tab.
5. In the upper-right corner of the Node Management page, click  next to

.

6. In the pop-up dialog box, configure the nodes for the read-only replica. For specific parameter information, see the following table.

Parameter Name
Parameter Description
Account Name
Fixed to the Default account, that is, the system enables replica read-only only for the default account.
Command Permission
Fixed to Read/Write permissions. The default account has read-write permissions.
Read-Only Routing Policy
By default, Replica Node are selected. You can also choose Master Node or select both replica nodes and primary nodes. Read requests will be automatically load-balanced by the system to the configured read-only nodes.
Read Local Nodes Only
When the instance is deployed in multiple AZs, this parameter is displayed. The nearby access feature switch is fixed to Disabled. You can configure the parameter read-local-node-only on the Parameter Settings page in the console to enable or disable this feature.
Fees
Currently in free trial.
7. After the parameter configuration is confirmed to be correct, click OK.
8. Instance Status changes to Processing. Wait until it becomes Running. On the Instance Details page, in the Specifications section, you can view that Read-only Replica is Enabled, and then you can experience read/write separation.

Disable Read-Only Replica

Note:
If the read-only routing policy of the instance's custom account specifies that read requests are distributed to replica nodes, you cannot directly disable the read-only replica feature. Please first set the read-only policy to the primary node, then disable the read-only replica feature.
2. At the upper part of the Instance List page on the right, select a region.
3. In the instance list, find the target instance.
4. Click the Instance ID to go to the Instance Details page, and then click the Node Management tab.
5. In the upper-right corner of the Node Management page, click

next to Read-only Replica.
6. In the dialog box for Disable Read-only Replica, understand the impact of disabling read-only replica, confirm the disable, and click OK.
7. Instance Status changes to Processing. Wait until it becomes Running. On the Instance Details page, in the Specs Info section, you can view that Read-Only Replica is Disabled, indicating that the disabling is complete.

Command Routing Description

After the read-only replica is enabled, some commands will not be routed to replica nodes but only routed to the primary node. Specific commands are listed in the table below.
Architecture Type
Commands Routed Only to the Primary Node Under Read/Write Separation
Standard Edition
getdel,getex,set,setnx,setex,psetex,append,del,unlink,setbit,bitfield,setrange,incr,decr,rpush,lpush,rpushx,lpushx,linsert,rpop,lpop,brpop,brpoplpush,blpop,lset,ltrim,lrem,rpoplpush,sadd,srem,smove,spop,sinterstore,sunionstore,sdiffstore,sscan,zadd,zincrby,zrem,zremrangebyscore,zremrangebyrank,zremrangebylex,zunionstore,zinterstore,zscan,zpopmin,zpopmax,bzpopmin,bzpopmax,hset,hsetnx,hmset,hincrby,hincrbyfloat,hdel,hscan,incrby,decrby,incrbyfloat,getset,mset,msetnx,swapdb,move,rename,renamenx,expire,expireat,pexpire,pexpireat,scan,ping,multi,exec,discard,flushdb,flushall,sort,replconf,info,imonitor,persist,role,subscribe,unsubscribe,psubscribe,punsubscribe,publish,pubsub,watch,unwatch,restore,eval,evalsha,script,time,bitop,wait,command,readonly,lastsave,echo,geoadd,georadius,georadiusbymember,pfadd,pfmerge,pfdebug,xadd,xreadgroup,xgroup,xsetid,xack,xclaim,xautoclaim,xdel,xtrim,hello
Cluster Edition
getdel,getex,set,setnx,setex,psetex,append,del,unlink,setbit,bitfield,setrange,incr,decr,rpush,lpush,rpushx,lpushx,linsert,rpop,lpop,brpop,brpoplpush,blpop,lset,ltrim,lrem,rpoplpush,sadd,srem,smove,spop,sinterstore,sunionstore,sdiffstore,sscan,zadd,zincrby,zrem,zremrangebyscore,zremrangebyrank,zremrangebylex,zunionstore,zinterstore,zscan,zpopmin,zpopmax,bzpopmin,bzpopmax,hset,hsetnx,hmset,hincrby,hincrbyfloat,hdel,hscan,incrby,decrby,incrbyfloat,getset,mset,msetnx,swapdb,move,rename,renamenx,expire,expireat,pexpire,pexpireat,keys,scan,dbsize,ping,echo,lastsave,multi,exec,discard,flushdb,flushall,sort,info,persist,role,subscribe,unsubscribe,psubscribe,punsubscribe,publish,pubsub,watch,unwatch,restore,eval,evalsha,script,time,bitop,wait,geoadd,georadius,georadiusbymember,pfadd,pfmerge,pfdebug,xadd,xreadgroup,xgroup,xsetid,xack,xclaim,xautoclaim,xdel,xtrim,hello

Related APIs

API
Feature Description
Enable read/write separation.
Disable read/write separation.

도움말 및 지원

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

피드백