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

Cache for Redis

Copy page
Download PDF
Modifying instance configuration
Modifying sharding cluster configuration
Copy page
Download PDF
Modifying sharding cluster configuration
Cache for Redis offers two architectures: sharding cluster enabled and sharding cluster disabled. It supports converting a sharding cluster disabled instance to a sharding cluster enabled instance to meet business horizontal scaling requirements. This topic describes the procedure for enabling sharding cluster architecture for instance.​
Prerequisites​
  • The instance architecture is sharding cluster disabled. For more details on instance architecture, refer to Product architecture.​
  • The instance status is Running. For more details, refer to Instance status.​
Precautions​
  • If you need to change the instance to a sharding cluster, you must wait for all multi-key commands to complete. Executing commands during the change period may cause the change operation to fail. For more information on multi-key commands, refer to Limits on multiple key commands.​
  • Once instance is changed from sharding cluster disabled to sharding cluster enabled, it cannot be reversed.​
  • Changing the sharding cluster status from disabled to enabled only alters the architecture of the instance, with the instance type, availability zone, connection address, and other attributes remaining unchanged.​
  • After changing instance with sharding cluster disabled to sharding cluster enabled, the instance architecture changes, and there will be differences in limits concerning Lua script usage, multi-key commands, transaction commands, and other commands. For more information about command limits, refer to Command limits.​
  • 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.​
  • 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.​
Procedure​
  1. Log in to the Redis console.​
  1. In the upper-left corner of the top menu bar, select the project and region to which the instance belongs.​
  1. On the Instances page, click the target instance.​
  1. In the Configuration pane under the Summary tab, click Enable next to the instance whose sharding cluster has disabled.​
  1. In the Sharding cluster enabled pop-up window, configure the following parameters according to service requirements.​
  • ​
    Parameters​
    Description​
    Target number of shards​
    You can set the number of shards according to service volume. The value can be any integer between 2 and 256.​
    Node specification​
    Select the node specifications of the instance with sharding cluster enabled. You can choose to upgrade or downgrade the node specifications. For more information on specifications, refer to Instance specifications.​
    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. For specific procedures of checking Used memory, refer to Viewing instance information.​
    Specifications preview​
    Review and confirm details of instance specifications and performance after the specification modification, including total RAM capacity, number of shards, node specification, number of nodes per shard, total bandwidth and the total number of connections.​
    Backup​
    You can choose whether to perform a full backup before the specification modification.​
    warning​
    • Only Redis primary-secondary instances support this configuration. Single node instances do not support backup features and cannot set this parameter.​
    • 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. You can enable data flashback manually after completing the specification modification. For more information on how to use data flashback, refer to Setting data flashback.​
    Backup name​
    After checking Make full backup before modifying configuration, you can set a backup name for the full backup. It is an optional field. If you don't set a backup name, the backup ID will be used as the name by default.​
    If you want to set a backup name, the name must meet the following conditions simultaneously:​
    • It should start with a Chinese character, a letter, or an underscore (_).​
    • The length should be between 1 and 128 characters.​
    • It can only contain Chinese characters, letters, digits, underscores (_), and hyphens (-).​
    tip​
    • After the backup is successfully created, you can view and download the backup on the Backups page. For more details, refer to Viewin backups.​
    • You can also modify the backup name after the backup creates successfully. For specific procedures, refer to Modifying backup name.​
    Execution time​
    To perform instance configuration changing tasks, you can choose either Execute now or Execution during maintainable window.​
    tip​
    If you choose to perform the operation within the maintenance period, the instance status will immediately change (for example, to Configuration modifying) and this status will persist until the task is complete, but the actual execution time of the operation task will still be within the maintenance period. For the method to set the maintenance period, refer to Setting maintenance period.​
    Agreements​
    Read and check the relevant agreements.​
    ​
  1. Complete the subsequent steps according to the billing method you have selected.​
  • ​
Relevant APIs​
​
API​
Description​
Call the EnableShardedCluster API to change an instance with sharding cluster disabled to an instance with sharding cluster enabled.​
​
​
Last updated: 2026.04.15 17:41:04