ApsaraDB for Redis can monitor the health status of nodes. If a master node in an instance becomes unavailable, ApsaraDB for Redis automatically triggers a master-replica switchover. The roles of master and replica nodes are switched over to ensure high availability of the instance. ApsaraDB for Redis allows you to manually trigger a master and replica switchover. This feature can be applied to disaster recovery drills and nearby access to applications that are deployed across zones.

Causes

  • Manual switchover

    You or your authorized Alibaba Cloud technical expert manually performs a master-replica switchover. For more information, see Switch node roles.

  • Risk mitigation

    Alibaba Cloud detects vulnerabilities in the ApsaraDB for Redis instance. The ApsaraDB for Redis instance may not be able to run as expected due to these vulnerabilities. In this case, ApsaraDB for Redis fixes these vulnerabilities and performs a master-replica switchover during a specified maintenance window.

    You can find events that are triggered under the preceding conditions in log history. For more information, see Query history events. You can also manage pending events of master-replica switchovers. For more information, see Query or manage pending events.

  • Instance failure

    Alibaba Cloud detects failures in an ApsaraDB for Redis instance. The ApsaraDB for Redis instance cannot run as expected due to these failures. In this case, ApsaraDB for Redis performs a master-replica switchover to switch your workloads to the replica nodes. This minimizes the impacts of the failures.

    You are notified of such events with internal notifications in the following format:

    [Alibaba Cloud] Dear ******: Your ApsaraDB for Redis instance r-bp1zxszhcgatnx**** (name: ****) has an error. A switchover is triggered to ensure that your instance runs as expected. Please check whether your application is still connected to your instance. We recommend that you configure your application to reconnect to the instance.

Impacts

  • After a switchover of master and replica nodes is performed, the data nodes may change to the read-only state and become disconnected for a few 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.
    Note After the master and replica switchover is completed, the state of the instance becomes Running.