All Products
Search
Document Center

PolarDB:Disaster recovery drills

Last Updated:Mar 28, 2026

Simulate node or zone failures on a PolarDB for MySQL cluster to verify that your high-availability architecture recovers as expected.

The disaster recovery drill feature is in canary release. To enable it for your cluster, contact us.

How it works

A disaster recovery drill injects a fault into a selected node or zone, makes the target unavailable, and then triggers the cluster's built-in recovery process. The drill runs in two dimensions:

DimensionScopeRecovery target
NodeOne node at a timeHot standby node or read-only node is promoted; or a new read-only node is created
ZoneAll nodes in the selected zoneBusiness switches over to the secondary zone

Use the node dimension to test individual node failover. Use the zone dimension to test a full zone outage and cross-zone switchover.

Prerequisites

Before you begin, ensure that your cluster meets the following requirements:

  • Edition: Enterprise Edition

  • Engine version:

    • MySQL 5.6, revision version 5.6.1.0.42 or later

    • MySQL 5.7, revision version 5.7.1.0.26 or later

    • MySQL 8.0.1, revision version 8.0.1.1.30.2 or later

    • MySQL 8.0.2, revision version 8.0.2.2.19 or later

Risks and mitigations

Disaster recovery drills carry risks of transient connections and data loss. To avoid affecting your production environment, run drills on a cloned cluster. Pair drills with Intelligent Stress Testing to simulate realistic production workloads.

Data loss conditions:

Drill dimensionConditionData loss
ZoneRecovery Point Objective (RPO) < 60May occur
NodeCluster has hot standby nodes or read-only nodes, and RPO is 0No data loss

Run a disaster recovery drill

  1. Log on to the PolarDB console.

  2. In the left-side navigation pane, click Clusters.

  3. In the upper-left corner, select the region where the target cluster is deployed.

  4. Find the cluster and click its ID.

  5. In the left-side navigation pane, click Service Availability. On the page that appears, click the Drill tab.

  6. On the Drill page, select the zone or nodes for the drill. Click Start Drill.

    If you select a zone, the drill runs on all nodes in that zone. The Drill page also provides shortcuts to Intelligent Stress Testing and Clone Cluster.

    image

  7. In the Fault Injection Method dialog box, select Fault Injection By Node. Click OK.

    image

  8. On the Drill page, monitor the drill progress in the Drill List section. The list shows the current status and phase of the drill task.

    • Node dimension image

    • Zone dimension image

Drill phases

Fault injection

Faults are injected based on the Drill Nodes and Fault Injection Method values you selected.

Recovery

Node dimension

The recovery path depends on which node you selected and the cluster's current composition:

Selected nodeCluster compositionRecovery action
Primary nodeHas a hot standby nodeHot standby node is promoted to primary node
Primary nodeHas a read-only node, no hot standby nodeRead-only node is promoted to primary node
Primary nodeNo hot standby node or read-only nodeDrill runs in zone dimension instead
Read-only nodeAnyA new read-only node is created

Zone dimension

All nodes in the selected zone are taken offline, and business switches over to the secondary zone.

The following figures show the architecture before, during, and after the zone-dimension drill.

Architecture before the drill:

image

All nodes in the zone taken offline:

image

Primary node becomes available in the secondary zone:

image

The system then determines whether to rebuild other nodes in the new primary zone based on available resources:

image

Post-drill

This phase applies only to zone-dimension drills. The duration depends on data volume and network latency. Business is not affected during this phase.

If other nodes were rebuilt in the new primary zone:

Rebuild read-only nodes:

image

Switch back primary node:

image

If other nodes were not rebuilt in the new primary zone:

Rebuild read-only nodes:

image

Switch back primary node:

image

What's next