About cross-data-center replication

This page provides an overview of AlloyDB Omni cross-data-center replication.

AlloyDB Omni cross-data-center replication lets you create secondary database clusters and instances from a primary database cluster to make the resources available in different data centers, in the event of an outage in the primary data center. These secondary database clusters function as copies of your primary database cluster resources.

Key concepts in this page include the following:

  • Primary database cluster. A read-write database cluster in a single data center.
  • Secondary database cluster. A read-only database cluster in a different data center than the primary, that replicates from the primary database cluster asynchronously. In the event of a failure of an AlloyDB Omni primary database cluster, you can promote a secondary database cluster to a primary database cluster.

Benefits

The benefits of cross-data-center replication on AlloyDB Omni include the following:

  • Disaster recovery. In the event the primary database cluster's data center becomes unavailable, you can promote AlloyDB Omni resources in another data center to serve requests.

  • Geographically distributed data. Distributing the data geographically brings the data closer to you and decreases read latency.

  • Geographic load balancing. In the event of slow or overloaded connections in one data center, you can route traffic to another data center.

  • Improved read performance. It makes AlloyDB Omni resources available closer to your application's data center.

  • Switchover. You can perform a switchover for testing your disaster recovery setup or performing migration of your workload.

How to work with cross-data-center replication

Working with AlloyDB Omni cross-data-center replication involves the following tasks:

  • Create a secondary database cluster. A secondary database cluster is a continuously updated copy of your AlloyDB Omni primary cluster.

  • View a secondary database cluster. After you create a secondary database cluster, you can view its status and replication status.

  • Promote a secondary database cluster. You can read the data in a secondary database cluster but cannot write to it until you promote it to a primary database cluster.

    There are two common scenarios for promoting your secondary database cluster to a primary database cluster:

    • Data center migration. Perform a planned migration of the AlloyDB Omni resources from their primary data center to another data center.

    • Disaster recovery. Rapidly activate the AlloyDB Omni resources in a secondary data center in the event that the resources in the primary data center become unavailable. Due to replication lag, some data loss might occur.

    Promoting a secondary database cluster converts it to a standalone fully functional database cluster with read and write capabilities. The promoted database cluster no longer replicates the data from the primary database cluster it was formerly associated with.

  • Switchover. Switchover lets you reverse the roles of your primary and secondary database cluster. You can perform a switchover for testing your disaster recovery setup or performing migration of your workload. When you complete the switchover, the direction of replication is reversed.

What's next