You cannot directly set hot standby nodes when you create a cluster. You can only enable the failover with hot standby feature for existing read-only nodes in your cluster.

Prerequisites

Only PolarDB for MySQL Cluster Edition 5.7 and 8.0 clusters support the failover with hot standby feature.

Precautions

  • If the failover with hot standby feature is not enabled for read-only nodes, your services may be interrupted for about 20 to 30 seconds when failover occurs. Therefore, make sure that your applications can be automatically reconnected to the cluster. If the hot standby feature is enabled for read-only nodes, failover can be completed within 3 to 10 seconds.
  • After the failover with hot standby feature is enabled for a read-only node, the node will no longer process read requests.
  • The specifications of hot standby nodes must be the same as those of the primary node.

Procedure

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster that you want to manage is deployed.
  3. Find the cluster you want to manage and click the cluster ID.
  4. In the Database Nodes section of the Overview page, click the Failover icon in the upper-right corner of the section to switch views.
  5. In the Database Nodes section, find the read-only node for which you want to enable hot standby and click Enable Hot Standby in the Actions column.
    Enable the failover with hot standby feature
    Note When the failover with hot standby feature is enabled for the first time, all nodes in the cluster are restarted one by one. When the failover with hot standby feature is enabled or disabled in the future, the nodes will not be restarted.