tencent cloud

Replica is read-only
Last updated:2026-03-17 17:45:57
Replica is read-only
Last updated: 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.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback