All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Adjust the number of shards for a cluster instance

Last Updated:Mar 23, 2026

When your data volume or read/write traffic grows, you can scale out a cluster instance by adding shards. When traffic decreases, you can scale in by removing shards to reduce costs. Shards are added or removed horizontally, and the system automatically rebalances data across all shards.

When to scale the number of shards

Consider scaling the number of shards in the following scenarios:

  • Throughput bottleneck: Read or write throughput exceeds the capacity of the current number of shards.

  • Memory pressure: Memory usage per shard consistently exceeds 80%.

  • Cost optimization: Traffic has decreased, and you want to remove underutilized shards to reduce costs.

  • Data growth: Your dataset size is approaching the total memory capacity of the current shards.

Note

To adjust the memory or performance specifications of a single shard without changing the number of shards, see Change instance configuration.

Prerequisites

Before you begin, make sure that you have:

  • Confirmed the deployment mode of the instance: Log on to the console and check whether the instance is a cloud-native or classic edition cluster on the Basic Information page. The two editions have different scaling processes and service impacts. For details, see the corresponding tab in the Procedure section.

  • Planned the operation during off-peak hours to minimize the impact on your business

  • Understood the billing changes:

    • Pay-as-you-go instances: After you add or remove shards, the instance is billed based on the new specifications

    • Subscription instances: Adding shards incurs additional charges. Removing shards triggers an automatic refund. For more information, see Pricing for configuration changes

Procedure

Cloud-native cluster

You can add or remove shards directly on the original instance. The system automatically rebalances data across shards.

Impact

  • Adding shards: No transient disconnections or read-only states. The instance scales out smoothly.

  • Removing shards: Connections on the removed shards are forcibly disconnected, which may cause transient disconnections. Make sure that your application has a reconnection mechanism.

  • Latency: Response latency may fluctuate during the operation. We recommend that you perform scaling during off-peak hours.

Limits

  • When you remove shards from a proxy mode instance, you can select Update During Maintenance. In all other scenarios, the operation executes immediately. After the operation is submitted, the instance status changes to Changing Configuration.

  • An instance must have a minimum of 2 shards and a maximum of 256 shards. You can add or remove a maximum of 64 shards in a single operation.

Important

When you add shards, you must add at least 1/6 of the current total number of shards (rounded up) to ensure efficient data rebalancing. For example: if the instance has 8 shards, you must add at least 2 shards (8/6 ≈ 1.33, rounded up to 2). If the instance has 64 shards, you must add at least 11 shards. New shards must have the same specifications as existing shards.

Add shards

  1. 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.

  2. In the Shard Information section, click Add shards.

  3. In the dialog box, set the number of shards to add, and then click Proceed to Pay.

  4. Complete the payment flow.

Note

New shards must have the same specifications as existing shards. You cannot adjust the specifications during this operation.

Remove shards

Warning

Removing shards reduces the total capacity and performance of the instance. Make sure that the remaining shards have enough capacity to hold all data. Proceed with caution.

  1. 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.

  2. In the Shard Information section, click Batch Delete to remove multiple shards at once, or click Delete next to the target shard to remove a single shard.

  3. In the confirmation dialog box, click OK. The shard is deleted immediately, and its data is automatically migrated to the remaining shards.

Classic cluster

To scale a classic edition cluster, create a new instance with the desired number of shards and migrate all data from the original instance. The system switches business connections to the new instance at a specified time.

Impact

  • Transient disconnections: One or two transient disconnections, each lasting less than 30 seconds, may occur during the switchover. Make sure that your application has a reconnection mechanism.

  • Read-only state: The instance typically enters a read-only state for less than one minute. If the write volume is large, the read-only duration may be longer.

  • Minor version upgrade: The system upgrades the minor version of the instance to the latest version during the configuration change.

Limits

If an endpoint in direct connection mode is enabled for the instance, you cannot adjust the number of shards by using this method. For more information, see Upgrade or downgrade a classic edition cluster instance.

Procedure

  1. 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.

  2. In the upper-right corner of the instance details page, click Change Configuration and select an option:

    • Subscription instances: Select Upgrade (scale out) or Downgrade (scale in).

    • Pay-as-you-go instances: Select Upgrade or Downgrade.

  3. On the configuration change page, adjust the Number of Shards, and then click Buy Now.

    Important

    Select a maintenance window for the Switch Time setting to minimize the impact during peak hours. You can change the scheduled time in the Task Hub before the task executes.

  4. Follow the on-screen instructions to complete the payment flow.

Verify the result

After you submit the scaling task, the instance status changes to Upgrading/Downgrading. To verify the result:

  1. Track the task progress on the Task Hub page in the console.

  2. After the task completes, return to the instance details page.

  3. In the Shard Information section, confirm that the number of shards matches the target value.

FAQ

  • Q: Will data be rebalanced when I add or remove shards?

    A: Yes. The system automatically rebalances data to ensure even distribution across all shards. No manual intervention is required, and your business access remains unaffected during rebalancing.

  • Q: Will data be lost if I remove a shard?

    A: No. Data on the removed shard is automatically migrated and redistributed to the remaining shards.

  • Q: Will I receive a refund if I remove shards from a subscription instance?

    A: Yes. The cost difference is automatically refunded. For more information, see Pricing for configuration changes.

  • Q: Can a classic edition instance be converted to a cloud-native edition instance?

    A: Yes. The conversion provides improved management features, including seamless scaling (scale out without transient disconnections). For more information, see Convert to the cloud-native deployment mode.

  • Q: Do I need to update my application connection settings after scaling?

    A: In most cases, no. For cloud-native edition instances, the connection endpoint remains unchanged after you add or remove shards. For classic edition instances, the proxy endpoint remains unchanged, but if you use direct connection mode, the endpoints of removed shards are no longer available. Your application can continue using the existing proxy connection settings.

  • Q: Can I cancel a scaling operation in progress?

    A: For classic edition instances, you can change the scheduled switch time in the Task Hub before the task executes. After the task starts, it cannot be canceled. For cloud-native edition instances, the scaling operation starts immediately after submission and cannot be canceled.