YugabyteDB Anywhere allows you to use its UI or API to manage asynchronous replication between independent YugabyteDB clusters. You can perform deployment via unidirectional (master-follower) or bidirectional (multi-master) xCluster replication between two data centers.

Within the concept of replication, universes are divided into the following categories:

  • A source universe contains the original data that is subject to replication.

    Note that in the current release, replicating a source universe that has already been populated with data can be done only by contacting Yugabyte Support.

  • A target universe is the recipient of the replicated data. One source universe can replicate to one or more target universes.

For additional information on xCluster replication in YugabyteDB, see the following:

You can use the YugabyteDB Anywhere UI to set up and configure xCluster replication for universes whose tables do not contain data. In addition, you can perform monitoring by accessing the information about the replication lag and enabling alerts on excessive lag.

Set up replication

You can set up xCluster replication as follows:

  1. Open the YugabyteDB Anywhere UI and navigate to Universes.

  2. Select the universe you want to replicate and navigate to Replication.

  3. Click Configure Replication to open the dialog shown in the following illustration:

    Configure Replication

  4. Provide the name for your replication.

  5. Select the target universe.

  6. Click Next: Select Tables.

  7. From a list of common tables between source and target universes, select the tables you want to include in the replication and then click Create Replication, as per the following illustration:

    Create Replication

Configure replication

You can configure an existing replication as follows:

  1. Open the YugabyteDB Anywhere UI and navigate to Universes.

  2. Select the universe whose existing replication you want to modify and then navigate to Replication, as per the following illustration:

    Replication

  3. Click Configure Replication and perform steps 4 through 7 from How to set up replication.

View, manage, and monitor replication

To view and manage an existing replication, as well as configure monitoring, click the replication name to open the details page shown in the following illustration:


Replication Details

This page allows you to do the following:

  • View the replication details.

  • View and modify the list of tables included in the replication, as follows:

    • Select Tables, as per the following illustration:

      Tables

    • Click Modify Tables.

    • Use the Add tables to the replication dialog to change the table selection, as per the following illustration:

      Change Tables

      The following illustration shows the Add tables to the replication dialog after modifications:

      Change Tables

  • Configure the replication, as follows:

    • Click Actions > Edit replication configuration.

    • Make changes using the Edit cluster replication dialog shown in the following illustration:

      Edit Replication

  • Set up monitoring by configuring alerts, as follows:

    • Click Configure Alert.

    • Use the Configure Replication Alert dialog to enable or disable alert issued when the replication lag exceeds the specified threshold, as per the following illustration:

      Alert

  • Pause the replication process (stop the traffic) by clicking Pause Replication. This is useful when performing maintenance. Paused replications can be resumed from the last checkpoint.

  • Delete the universe replication by clicking Actions > Delete replication.

Set up bidirectional replication

You can set up bidirectional replication using either the YugabyteDB Anywhere UI or API by creating two separate replication configurations. Under this scenario, a source universe of the first replication becomes the target universe of the second replication, and vice versa.