Skip to content

Zone-Redundant High Availability#

Reliability · Azure Database for MySQL · Rule · 2024_09 · Important

Deploy Azure Database for MySQL servers using zone-redundant high availability (HA) in supported regions to ensure high availability and resilience.

Description#

Azure Database for MySQL flexible servers allows configuration high availability (HA) across availability zones in supported regions. Using availability zones improves resiliency of your solution to failures or disruptions isolated to a zone or data center.

Zone-redundant HA works by:

  • Deploying two servers; a primary in one zone, and a secondary in a physically separate zone.
  • Database and backup storage is also configured across zones and replicated.

The failover process ensures continuous operation by switching from the primary server to the standby replica server. This process can be:

  • Manual (Planned) Failover: Initiated by the user for maintenance or other operational reasons.
  • Automatic (Unplanned) Failover: Triggered by Azure in response to failures such as hardware or network issues affecting the primary server.

Before opting for the zone-redundant HA model, review the documentation for additional limitations and critical information. This includes understanding the latency impact between zones, cost implications, and any specific regional support constraints.

Recommendation#

Consider deploying flexible servers using zone-redundant high-availability to improve the resiliency of your databases.

Examples#

Configure with Azure template#

To configure servers that pass this rule:

  • Set the properties.highAvailability.mode property to ZoneRedundant.

For example:

Azure Template snippet
{
  "type": "Microsoft.DBforMySQL/flexibleServers",
  "apiVersion": "2023-10-01-preview",
  "name": "[parameters('serverName')]",
  "location": "[parameters('location')]",
  "sku": {
    "name": "Standard_D16as",
    "tier": "GeneralPurpose"
  },
  "properties": {
    "administratorLogin": "[parameters('administratorLogin')]",
    "administratorLoginPassword": "[parameters('administratorLoginPassword')]",
    "createMode": "Default",
    "version": "[parameters('mysqlVersion')]",
    "availabilityZone": "1",
    "highAvailability": {
      "mode": "ZoneRedundant",
      "standbyAvailabilityZone": "2"
     }
  }
}

Configure with Bicep#

To configure servers that pass this rule:

  • Set the properties.highAvailability.mode property to ZoneRedundant.

For example:

Azure Bicep snippet
resource mysqlDbServer 'Microsoft.DBforMySQL/flexibleServers@2023-10-01-preview' = {
  name: serverName
  location: location
  sku: {
    name: 'Standard_D16as'
    tier: 'GeneralPurpose'
  }
  properties: {
    administratorLogin: administratorLogin
    administratorLoginPassword: administratorLoginPassword
    createMode: 'Default'
    version: mysqlVersion
    availabilityZone: 1
    highAvailability: {
      mode: 'ZoneRedundant'
      standbyAvailabilityZone: 2
    }
  }
}

Configure with Azure Verified Modules

A pre-validated module supported by Microsoft is available from the Azure Bicep public registry. To reference the module, please use the following syntax:

br/public:avm/res/db-for-my-sql/flexible-server:<version>

To use the latest version:

br/public:avm/res/db-for-my-sql/flexible-server:0.4.1

Notes#

The zone-redundant HA model must be configured during the initial deployment. It is not possible to modify an existing server to include zone-redundant HA after it has been deployed.

The Burstable SKU tier is not supported.

Only a certain set of regions currently support the zone-redundant HA model.

Comments