Skip to content

For help, click the link below to get free database assistance or contact our experts for personalized support.

Multi-data center setup for disaster recovery

Disaster can happen at any moment. To keep your services running smoothly, you can set up two Percona XtraDB Clusters in different locations (called “sites”). You then configure multi-site replication between them. You then configure them to replicate data between each other. This makes sure both clusters have the same data and stay in sync. One site works as the primary site, and the other is a replica. It is usually in a standby mode.

If the primary site goes down, you need a way to move the workload to the backup site so that users won’t notice anything.

Once the primary site is fixed, you can move the services back to it.

This guide explains how to set up a disaster recovery system and transfer workloads between sites when something goes wrong.

Assumptions

  • This guide is about two Percona XtraDB Clusters (PXC) set up with the Operator in Kubernetes. The clusters are in two separate sites which represent different Kubernetes environments.

    To differentiate the clusters, let’s name them:

    • cluster1 is the PXC on the primary site
    • cluster2 is the PXC on the replica site
  • The primary and replica sites must be identical. The easiest way to achieve this is to make a backup on the primary site and restore it on the replica.

  • We assume your applications are already set up to automatically switch to the replica site B if the primary site goes down. Setting this up is not covered in this guide.


Last update: 2025-03-31