Create a database with Replica Of

Create Replica Of database

Replica databases copy data from source databases (previously known as master), which enable read-only connections from apps and clients located in different geographic locations.

To create a replica connection, you define a database as a replica of a source database. Replica Of databases (also known as Active-Passive databases) synchronize in the background.

Sources databases can be:

  • Located in the same Redis Enterprise Software cluster
  • Located in a different Redis Enterprise cluster
  • Hosted by a different deployment, e.g. Redis Cloud
  • Redis Community Edition databases

Your apps can connect to the source database to read and write data; they can also use any replica for read-only access.

Replica Of can model a variety of data relationships, including:

  • One-to-many relationships, where multiple replicas copy a single source database.
  • Many-to-one relationships, where a single replica collects data from multiple source databases.

When you change the replica status of a database by adding, removing, or changing sources, the replica database is synchronized to the new sources.

Configure Replica Of

You can configure a database as a Replica Of, where the source database is in one of the following clusters:

The order of the multiple Replica Of sources has no material impact on replication.

For best results when using the Multicast DNS (mDNS) protocol to resolve the fully-qualified domain name (FQDN) of the cluster, verify that your client connections meet the client mDNS prerequisites.

Note:
As long as Replica Of is enabled, data in the target database will not expire and will not be evicted regardless of the set data eviction policy.

Same Redis Enterprise cluster

To configure a Replica Of database in the same Redis Enterprise cluster as the source database:

  1. Create a new database or select an existing database from the Databases screen.

  2. For an existing database, select Edit from the Configuration tab.

  3. Expand the Replica Of section.

  4. Select + Add source database.

  5. In the Connect a Replica Of source database dialog, select Current cluster.

  6. Select the source database from the list.

  7. Select Add source.

  8. Select Save.

Different Redis Enterprise cluster

To configure a Replica Of database in a different Redis Enterprise cluster from the source database:

  1. Sign in to the Cluster Manager UI of the cluster hosting the source database.

    1. In Databases, select the source database and then select the Configuration tab.

    2. In the Replica Of section, select Use this database as a source for another database.

    3. Copy the Replica Of source URL.

      Copy the Replica Of source URL from the Connection link to destination dialog.

      To change the internal password, select Regenerate password.

      If you regenerate the password, replication to existing destinations fails until their credentials are updated with the new password.

  2. Sign in to the Cluster Manager UI of the destination database's cluster.

  3. Create a new database or select an existing database from the Databases screen.

  4. For an existing database, select Edit from the Configuration tab.

  5. Expand the Replica Of section.

  6. Select + Add source database.

  7. In the Connect a Replica Of source database dialog, select External.

  8. Enter the URL of the source database endpoint.

  9. Select Add source.

  10. Select Save.

For source databases on different clusters, you can compress replication data to save bandwidth.

Redis Community Edition cluster

To use a database from a Redis Community Edition cluster as a Replica Of source:

  1. Create a new database or select an existing database from the Databases screen.

  2. For an existing database, select Edit from the Configuration tab.

  3. Expand the Replica Of section.

  4. Select + Add source database.

  5. In the Connect a Replica Of source database dialog, select External.

  6. Enter the URL of the source endpoint in one of the following formats:

    • For databases with passwords:

      redis://:<password>@<host>:<port>
      

      Where the password is the Redis password represented with URL encoding escape characters.

    • For databases without passwords:

      redis://<host>:<port>
      
  7. Select Add source.

  8. Select Save.

Configure TLS for Replica Of

When you enable TLS for Replica Of, the Replica Of synchronization traffic uses TLS certificates to authenticate the communication between the source and destination clusters.

To encrypt Replica Of synchronization traffic, configure encryption for the source database and the destination replica database.

Encrypt source database traffic

To enable TLS for Replica Of cluster connections:

  1. For each cluster hosting a replica:

    1. Go to Cluster > Security > Certificates.

    2. Expand the Replica Of and Active-Active authentication (Syncer certificate) section.

      Syncer certificate for Replica Of and Active-Active authentication.
    3. Download or copy the syncer certificate.

  2. From the Security tab of the Replica Of source database, select Edit.

  3. In the TLS - Transport Layer Security for secure connections section, make sure the checkbox is selected.

  4. In the Apply TLS for section, select Between databases only.

  5. Select Mutual TLS (Client authentication).

    Replica Of TLS authentication configuration.
  6. Select + Add certificate, paste or upload the syncer certificate, then select Done.

    Repeat this process, adding the syncer certificate for each cluster hosting a replica of this database.

  7. (Optional) To require TLS for client connections, change Apply TLS for to Clients and databases + Between databases and add client certificates.

  8. Select Save.

Encrypt replica database traffic

To enable TLS for Replica Of in the destination database:

  1. From the Cluster Manager UI of the cluster hosting the source database:

    1. Go to Cluster > Security > Certificates.

    2. Expand the Server authentication (Proxy certificate) section.

      Proxy certificate for server authentication.
    3. Download or copy the proxy certificate.

  2. From the Configuration tab of the Replica Of destination database, select Edit.

  3. Expand the Replica Of section.

  4. Point to the source database entry and select The Edit button to edit it.

  5. Paste or upload the source proxy certificate, then select Done.

  6. Select Save.

RATE THIS PAGE
Back to top ↑