You need to enable JavaScript to run this app.
Cache for Redis

Cache for Redis

Copy page
Download PDF
Modifying instance configuration
Solutions for modification of instance specifications
Copy page
Download PDF
Solutions for modification of instance specifications
You can flexibly adjust Redis instance configurations based on business volume changes. This includes horizontal scaling (increasing or decreasing the number of instance shards), vertical scaling (upgrading or downgrading node specifications), and adjusting the number of nodes per shard. This topic describes the configuration adjustment solutions supported by Redis.​
Precautions​
  • For sharding cluster enabled instances with an applied direct connection address, the instance's shard count cannot exceed 8 during configuration changes. If you need to increase the number of shards while direct connection is enabled, submit a ticket to contact technical support.​
  • Initiating a configuration change after enabling data flashback will automatically disable the data flashback feature. After the data flashback feature is disabled, previous flashback points will no longer be retained. For more details, refer to Setting data flashback.​
  • The completion time for configuration changes is influenced by various factors (such as network, task queue, current instance load, and data volume). Perform configuration adjustments during off-peak business hours.​
Specification modification solutions​
Different modification operations apply to different Redis instance types. The specific applicable scenarios are shown in the table below.​
tip​
In the table below, ✔️ indicates that the current instance or architecture type supports this configuration modification solution, while ❌ indicates it does not.​
​
Specification modification operation​
​
Scenario​
Impact​
Supported instance or architecture types​
​
​
​
​
​
​
​
Primary-secondary instance​
​
Single-node instance​
​
​
​
​
​
Sharding cluster enabled​
Sharding cluster disabled​
Sharding cluster enabled​
Sharding cluster disabled​
​
Each shard in the Redis primary-secondary instances contains one primary node and at least one secondary node. There is a replication relationship between the primary and secondary nodes. Redis supports changing the scalability and high availability of instances by increasing or decreasing the number of secondary nodes. For more details, refer to Core components.​
  • Adding nodes has no impact on the instance or services.​
  • When reducing nodes, the instance might experience up to 1 connection interruption, lasting within 30 seconds. Proceed with caution. It is recommended to perform configuration changes during off-peak hours and ensure that the client is configured with a proper retry mechanism.​
✔️​
✔️​
❌​
❌​
Vertical upscaling​
(Upgrading node specifications)​
You can perform upscaling, if the CPU load of the instance server node is relatively high or the total memory capacity is insufficient.​
During the node specification change, the instance may experience one or two temporary disconnections, each less than 30 seconds. Proceed with caution. It is recommended to perform configuration changes during off-peak hours and ensure that the client is configured with a proper retry mechanism.​
✔️​
✔️​
✔️​
✔️​
​
Vertical downscaling​
(Downgrading node specifications)​
Free up surplus memory capacity through downscaling.​
tip​
If you want to downgrade the node specification, you need to ensure that the current Used memory of the instance does not exceed 85% of the total new memory capacity, where total new memory capacity = modified single shard memory * shard number.​
​
✔️​
✔️​
✔️​
✔️​
Horizontal upscaling​
(Increasing shard)​
You can perform upscaling, if the CPU load of the instance server node is relatively high or the total memory capacity is insufficient.​
During the process of adding shards, the instance might prompt error -TRYAGAIN The specific keys are being migrated.\r\n.​
✔️​
❌​
✔️​
❌​
​
Horizontal downscaling​
(Reducing shard)​
Free up surplus memory capacity through downscaling.​
tip​
If you need to reduce the number of shards, make sure that the Used memory of each single shard in the instance after reducing the shards does not exceed 85% of the memory specification of a single shard. Otherwise, the configuration change will fail.​
During the process of reducing shards or changing sharding cluster configuration of instance, the instance might prompt the error -TRYAGAIN The specific keys are being migrated.\r\n, or experience one or two temporary disconnections, each less than 30 seconds. Proceed with caution. It is recommended to perform configuration changes during off-peak hours and ensure that the client is configured with a proper retry mechanism.​
✔️​
❌​
✔️​
❌​
​
Change instances with sharding cluster disabled to instances with sharding cluster enabled to meet business horizontal scaling requirements.​
​
❌​
✔️​
❌​
✔️​
​
Cache for Redis offers single-node and primary-secondary instance types. Primary-secondary instances offer enterprise-grade high-availability capabilities such as persistent storage, automatic backup, cross-availability zone disaster recovery, and read/write splitting, effectively ensuring data persistence, availability, and security. You can switch a single-node instance to a primary-secondary instance to meet business growth demands for a high-availability architecture.​
tip​
During the process of switching to a primary-secondary instance, if you also reduce the number of shards or downgrade node specifications, ensure that the current Used memory of the instance does not exceed the total new memory capacity, where total new memory capacity = modified single shard memory * shard number.​
During the change process, the instance might prompt the error -TRYAGAIN The specific keys are being migrated.\r\n, or experience one or two temporary disconnections, each less than 30 seconds. Proceed with caution. It is recommended to perform configuration changes during off-peak hours and ensure that the client is configured with a proper retry mechanism.​
​
❌​
❌​
✔️​
✔️​
​
Billing information​
For details on the billing rules for changing instance configurations, refer to Pay-as-you-go and Subscription.​
Last updated: 2026.04.14 10:55:47