All Products
Search
Document Center

Database Autonomy Service:Automatic shard addition

Last Updated:Feb 23, 2024

After you enable automatic shard addition for an ApsaraDB for Redis instance, Database Autonomy Service (DAS) automatically adds shards to the instance if sudden spikes in database traffic occur in the instance. This helps keep the memory utilization of the instance at a safe level, prevent out-of-memory issues, and ensure the stability of your online business. This topic describes how to enable automatic shard addition for an ApsaraDB for Redis instance.

Prerequisites

The database instance that you want to manage is an ApsaraDB for Redis Community Edition cloud-native cluster instance.

Scenario

If you enable automatic shard addition for an ApsaraDB for Redis instance in DAS, DAS automatically adds one shard to the instance when the available memory of the instance is insufficient.

Procedure

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Instance Monitoring. On the Instance Monitoring page, click the Redis tab.

  3. On the page that appears, find the database instance that you want to manage and click the instance ID. The instance details page appears.

  4. In the left-side navigation pane of the instance details page, click Autonomy Center. In the upper-right corner of the page that appears, click Autonomy Service Settings.

  5. On the Autonomous Function Settings tab of the Autonomous Function Management panel, enable the autonomy service. On the Optimization and Throttling tab, select Automatically Add Shards and configure the parameters.

    setting01

    Parameter

    Description

    Average Memory Usage ≥

    The threshold for triggering automatic shard addition.

    Maximum Number of Shards

    The maximum number of shards in the instance. The value must be a positive integer. Valid values: 4 to 32.

    Note

    When the total number of shards in the instance reaches the specified limit, shards are no longer automatically added to the instance.

    Observation Window

    The time range during which the performance of the database instance is observed.

    Note

    DAS periodically checks the instance. During the observation window, when the average memory utilization of the instance reaches the specified threshold, DAS automatically adds a shard to the instance.

    Note

    The billing rules and configuration change process are the same as those for manually adjusting the number of shards for an ApsaraDB for Redis cloud disk-based instance. For more information, see Change the configurations of an instance.

  6. Click OK.

References

If you want to reduce the number of shards in an ApsaraDB for Redis instance, you must manually adjust the number of shards. For more information, see Adjust the number of shards for an instance.