Azure Database for MariaDB Documentation

High Availability and Disaster Recovery for Azure Database for MariaDB

Ensuring the continuous availability of your mission-critical applications is paramount. Azure Database for MariaDB offers robust high availability (HA) and disaster recovery (DR) capabilities to protect your data and minimize downtime.

Understanding High Availability (HA)

High Availability refers to the ability of a system to remain operational and accessible during planned or unplanned disruptions. In Azure Database for MariaDB, HA is achieved through built-in redundancy and automatic failover mechanisms.

Replication and Automatic Failover

Azure Database for MariaDB utilizes different HA modes depending on the pricing tier:

Note: The exact HA implementation and guarantees depend on the chosen pricing tier and configuration. Always refer to the latest Azure documentation for specific details.

Disaster Recovery (DR) Strategies

Disaster Recovery focuses on restoring operations after a major catastrophic event, such as a region-wide outage. Azure Database for MariaDB provides several DR options:

1. Geo-Redundant Backups

By default, Azure Database for MariaDB creates geo-redundant backups. This means your backups are asynchronously copied to a paired Azure region. In the event of a regional disaster, you can restore your database to a new server in the paired region using these geo-redundant backups.

To restore from a geo-redundant backup:

  1. Navigate to your Azure Database for MariaDB server in the Azure portal.
  2. In the left-hand menu, select Server parameters.
  3. Search for the parameter `failover_group_replication_lag_seconds` (or similar, depending on your version).
  4. If you have configured a failover group, you can initiate a manual failover. Otherwise, you will need to restore from a backup.
  5. Select Backups from the left-hand menu.
  6. Choose the backup you wish to restore from and click Restore.
  7. Select a target region (preferably the paired region).
  8. Configure the new server details and click Review + create, then Create.

2. Geo-Replication (Read Replicas)

For scenarios requiring faster recovery and minimal data loss across regions, you can set up geo-replication using read replicas. This involves creating one or more read-only replicas of your primary server in different Azure regions. These replicas are updated asynchronously.

Steps to configure Geo-Replication:

  1. Navigate to your Azure Database for MariaDB server in the Azure portal.
  2. In the left-hand menu, select Replicas.
  3. Click Create replica.
  4. Select the target region for your read replica.
  5. Configure the replica server's compute and storage settings.
  6. Click Review + create, then Create.

In case of a disaster, you can promote a read replica to become a standalone, writeable server. This process is manual and requires careful planning to minimize data loss that might have occurred between the last replication and the disaster event.

Failover Groups: For higher availability and simplified DR across regions, consider implementing failover groups. Failover groups allow you to manage the replication and failover of multiple databases across different regions. They provide automatic or manual failover capabilities with a single listener endpoint, simplifying application connectivity during failover.

Planning Your HA/DR Strategy

When designing your HA/DR strategy for Azure Database for MariaDB, consider the following:

By leveraging the built-in HA and DR features of Azure Database for MariaDB, you can build resilient and highly available solutions for your applications.