Tair (Redis OSS-compatible) lets you enable read/write splitting and configure the number of read replicas for an instance. You can also disable it as needed.
Considerations
Transient disconnections: Enabling or disabling read/write splitting will cause a transient disconnection. To minimize impact, perform this operation during off-peak hours and develop an auto-reconnection logic for your application.
Command restrictions: Some commands are not supported for this feature. Evaluate the potential impact of these restrictions on your business before enabling it. See Limits on commands supported by cluster instances and read/write splitting instances for details.
Prerequisites
The deployment mode of the instance is cloud-native. For a classic instance, convert it to a cloud-native instance in advance.
The instance is a Redis Open-Source Edition instance, or a DRAM-based or persistent memory-optimized Tair (Enterprise Edition) instance.
The instance memory capacity is 1 GB or larger.
The instance is a high-availability instance.
For a cluster instance, it must be connected in proxy mode.
Procedure
Log on to the console and go to the Instances page. In the top navigation bar, select the region in which the instance that you want to manage resides. Then, find the instance and click the instance ID.
In the navigation pane on the left, click Node Management.
Turn on the Read/Write Splitting switch.
In the panel that appears, confirm the instance configuration and fees. Then, click Pay.
NoteThe newly created read replicas will have the same specifications as the primary node.
Follow the prompts to complete the payment.
After the payment succeeds, the instance status changes to Changing Configuration. Wait for 1 to 5 minutes until the instance status changes to Running. You can view the progress on the instance details page.
NoteFor instances deployed across multiple zones, the system provides separate endpoints for the primary and secondary zones. Both endpoints support read and write operations. After enabling read/write splitting for an instance, route requests from the secondary zone to the corresponding endpoint for low-latency access and load balancing.
(Optional) Modify the number of read replicas or disable read/write splitting.
Modify the number of read replicas: On the Node Management page, click Modify in the Actions column corresponding to the instance. A standard instance supports 1 to 9 read replicas. A cluster instance supports 1 to 4 read replicas per shard.
Disable read/write splitting: On the Node Management page, turn off the Read/Write Splitting switch.