This topic describes how to upgrade the major version of an ApsaraDB for Redis instance in the ApsaraDB for Redis console. For example, you can upgrade the major version from Redis 2.8 to Redis 4.0. This way, you can use the features in the new major version.

Workflow

The upgrade workflow varies based on the architecture of the ApsaraDB for Redis instance. For more information, see the following table.

Architecture Workflow
Cluster instance
  1. Apply for resources that are required to create an instance of a new major version. These resources include proxy node resources.
  2. Synchronize the full data and incremental data from the original instance to the new instance.
  3. Switch your workloads over from the original instance to the new instance. When data synchronization is close to completion, the original instance is set to the read-only state within 60 seconds until all data is synchronized. After data synchronization is complete, ApsaraDB for Redis disassociates the virtual IP addresses (VIPs) from the original instance and associates the VIPs with the new instance.
    Note If you select Update During Maintenance, ApsaraDB for Redis performs the switchover within the maintenance window that you specify.
  4. Check that the upgrade is complete. Then, release the original instance and change the status of the new instance to Running.
Read/write splitting instance
Standard instance
  1. Upgrade the original replica node. In this step, you need to stop the original replica node and create a replica node of a new major version.
  2. Synchronize data from the original master node to the new replica node.
  3. Switch your workloads over from the original master node to the new replica node. When data synchronization is close to completion, the instance is set to the read-only state within 60 seconds until all data is synchronized. After data synchronization is complete, ApsaraDB for Redis disassociates the VIPs from the original master node and associates the VIPs to the new replica node. In addition, ApsaraDB for Redis switches your workloads over from the original master node to the new replica node and promotes the new replica node to the new master node. The original master node is demoted to the new replica node.
    Note If you select Update During Maintenance, ApsaraDB for Redis performs the switchover within the maintenance window that you specify.
  4. Upgrade the original master node, namely, the new replica node. ApsaraDB for Redis repeats Step 1 and Step 2 to perform the upgrade and synchronize data.
  5. Check that the upgrade is complete. If the instance is in the Running state, the upgrade is successful.

Impacts

  • When you apply for resources, upgrade the replica node, or synchronize data, your ApsaraDB for Redis service remains available.
  • When you switch your workloads over from the original instance to a new instance or from the master node to the replica node in the original instance, you may experience transient connections that last a few seconds. The original instance stays in the read-only state within 60 seconds until all data is synchronized. We recommend that you upgrade the original instance during off-peak hours and make sure that your application is configured to automatically reconnect to the original instance.
  • If the original instance runs Redis 4.0, Bloom filter-related API operations, such as BF.ADD, are no longer supported after you upgrade the major version of the original instance to a version later than Redis 4.0.
    Notice Bloom filter-related API operations on existing instances of ApsaraDB for Redis 4.0 are only for internal use. In addition, new instances that run Redis 4.0 or later no longer support Bloom filter-related API operations. Therefore, if you call Bloom filter-related API operations, you cannot perform cache analytics and unknown errors may occur. We recommend that you change the edition of the original instance to ApsaraDB for Redis Enhanced Edition (Tair) to supports the optimized Bloom filter. For more information, see Performance-enhanced instances.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the top navigation bar of the page, select the region where the instance is deployed.
  3. On the Instances page, click the ID of the instance.
  4. In the section, click Major Update.
    Figure 1. Upgrade the major version
    Upgrade the major version of an ApsaraDB for Redis instance
    Note If the Major Update button does not appear, you are using the latest major version.
  5. In the pane that appears, specify the new major version and the time when you want to perform the upgrade.
    Notice When instances or the master and replica nodes are switched over, the instance experiences transient connections for a few seconds and stays in the read-only state within 60 seconds. We recommend that you select Update During Maintenance. This way, ApsaraDB for Redis performs the switchover within the specified maintenance window to minimize the impacts on your workloads. For more information about how to specify a maintenance window, see Specify a maintenance window.
  6. Click OK.

Related operations

API Description
ModifyInstanceMajorVersion Upgrades the major version of an ApsaraDB for Redis instance.

FAQ

  • Q: Why does the state of an instance change to Upgrading Major Version after I select Update During Maintenance to upgrade the major version?
    A: ApsaraDB for Redis is preparing for the upgrade. In the preparation phase, ApsaraDB for Redis needs to apply for resources and synchronize data. During the preparation process, ApsaraDB for Redis does not switch your workloads over from the original instance to a new instance or from the master node to the replica node of the original instance. Therefore, your workloads are not affected.
    Note The instance experiences transient connections for a few seconds and stays in the read-only state within 60 seconds only when the system switches the instances or master and replica nodes.
  • Q: Why does an upgrade to the major version of an instance fail?

    A: If the instance uses a phased-out specification, you must change the specification of the instance. Then, you can upgrade the major version of the instance. For more information, see Phased-out specifications.