All Products
Search
Document Center

ApsaraDB for Redis:Change the configurations of an instance

Last Updated:Nov 27, 2023

ApsaraDB for Redis allows you to change the configurations of instances. You can change configurations such as the architecture and specifications of an instance to meet different performance and capacity requirements.

Billing

For more information, see Configuration changes.

Change processes and impacts

Instance

Change process and impact

  • Local disk-based instance

  • Cloud disk-based instance that uses the standard architecture

Figure 1. Change process of local disk-based instances本地盘实例变更配置流程

  • The cluster architecture imposes requirements on Lua scripts. After you change a non-cluster instance to a cluster instance, the Lua scripts may be lost because the script content does not meet the requirements. You must back up the Lua scripts in advance. For more information, see Limits on commands supported by cluster instances and read/write splitting instances.

  • If you change the configurations of an instance, the instance may experience one or two transient connections that each lasts up to 30 seconds.

    Important

    When you change the configurations of an instance, we recommend that you set the Switching Time parameter to Switch Within Maintenance Window. In this case, the instance configurations are changed and transient connections occur in the next maintenance window.

  • To synchronize incremental data from the original instance to the new instance and prevent dual writes caused by the Domain Name System (DNS) cache, the instance becomes read-only for up to 1 minute during the configuration change. This ensures data consistency between the new and the original instances.

  • To ensure higher performance and stability, the system updates the minor version of the instance to the latest version during the configuration change.

  • Cloud disk-based instance that uses the cluster architecture

During the configuration change, ApsaraDB for Redis migrates slots, for example, to the newly added data shards. Redis performs data migration in the background, allowing for imperceptible scaling without blocking business requests. During this process, the latency remains within 100 milliseconds.

Note

After you change the configurations of an instance, the instance information that includes the instance ID, endpoints, data, whitelists, and existing accounts and their corresponding passwords does not change.

Limits

Instance

Limits

Local disk-based instance

Cloud disk-based instance that uses the cluster architecture

  • You cannot change the number and specifications of the data shards in an instance at the same time.

  • An instance can contain 2 to 256 data shards. You can add or remove up to 64 data shards each time.

    Note

    If the number of data shards is greater than 128, you can only adjust the number of data shards, but cannot adjust the specifications of the data shards.

  • The specifications of the data shards that you want to add must be the same as those of existing data shards. You cannot change the specifications of existing data shards.

For more information, see Adjust the number of shards for an ApsaraDB for Redis cloud-native instance.

Child instance in a distributed instance

  • You cannot change the architecture of a child instance, for example, from cluster to standard.

  • All child instances in a distributed instance must have the same configurations. Otherwise, performance or capacity issues may occur.

  • When you change the configurations of a cluster instance, you can adjust either the shard specifications or the number of shards each time. For more information, see Why am I unable to change the configurations of a classic (local disk-based) cluster instance?

When you downgrade the configurations of an instance, note that 80% of the memory capacity of the new instance must be greater than the amount of occupied memory in the original instance. Otherwise, the instance cannot be downgraded. For example, if the original instance is a standard DRAM-based instance that has a storage capacity of 8 GB and has 2 GB used, you can downgrade the instance to a standard DRAM-based instance that has a storage capacity of 4 GB.

Manually change the configurations of an instance

  1. Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click its ID.
  2. Perform the corresponding operations described in the following table based on the billing method of your instance.

    Billing method

    Procedure

    Pay-as-you-go

    1. In the upper-right corner of the page, click Change Configurations .

    2. On the Upgrade/Downgrade page, make the required configuration changes and click Buy Now.

    Subscription

    1. In the upper-right corner of the page, click Upgrade.

    2. On the Upgrade/Downgrade page, make required configuration changes and click Buy Now.

    Warning
    • If large keys exist in the original instance, the configuration change may fail.

      In this case, we recommend that you identify and delete large keys from the instance before you perform the configuration change. For more information about how to identify large keys, see Use the offline key analysis feature.

    • If you want to change a non-cluster instance to a cluster instance, or change the instance type of a cluster instance without changing its architecture, take note of the following items:

      • You must read and confirm the related limits of cluster instances. For more information about these limits, see Limits on commands supported by cluster instances and read/write splitting instances.

      • If the original instance contains Lua scripts, back up the Lua scripts in advance and select Force Upgrade during the configuration change. This way, you can complete the configuration change.

        If you select Force Upgrade, the Lua scripts are deleted from the original instance after the configuration change.

    • When you change the configurations of an instance, we recommend that you set the Switching Time parameter to Switch Within Maintenance Window. In this case, the instance configurations are changed in the next maintenance window. For more information, see Set a maintenance window.

  3. Complete the payment.

Related API operations

API operation

Description

ModifyInstanceSpec

Changes the configurations of an ApsaraDB for Redis instance.