ApsaraDB for Redis supports automatic failovers from the master node to the replica node. You can also manually switch workloads from the master node to the replica node. This allows you to perform real-time disaster recovery drills. You can also switch the node roles of the instance that is deployed across multiple zones based on your business deployment. This way, your applications can connect to the nearest nodes.


The instance is of Community Edition or Enhanced Edition (Performance-enhanced instances and Hybrid-storage instances)

Switchover impact

  • After switchover of master and replica nodes, the data nodes may experience transient connection errors and a read-only state for seconds. Make sure that your applications are configured to automatically reconnect to the instance.
  • After an instance enters the Switching state, you cannot manage this instance. For example, you cannot modify the instance configurations or migrate the instance to another zone.


In this scenario, the ECS instance where the application is deployed resides in Zone B. The master node of the ApsaraDB for Redis instance is deployed in Zone A. The ECS instance needs to connect to the master node across zones. This increases the network latency and may affect the performance of the ApsaraDB for Redis instance and your business operation.

Example of nearby connection in a zone

To optimize the architecture for deploying cloud resources, you can switch the roles of nodes. In this example, you can change the role of the node in Zone B to a master node. Only the node roles are changed. The ECS and ApsaraDB for Redis instances can be connected in the same zone without changing the actual zones where the ApsaraDB for Redis instance is deployed and the instance ID. This minimizes network latency.


  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instances page, click the Instance ID of the instance.
  4. In the left-side navigation pane, click Service Availability.
  5. In the Zone Distribution section, select the data node that requires switchover and click Switchover.
    Note You can view the distribution of the roles of data nodes in the zone on this page.
  6. In the panel that appears, select the time when you want the switchover to take effect.
    • Immediate: The configurations immediately take effect after the modification.
    • Maintenance Window: The configurations take effect within the specified maintenance window. For more information about how to view and modify a maintenance window, see Set the maintenance window.
  7. Click OK.