From 5b08edcc03f028a96b2f5eb3197e7f3600d4085e Mon Sep 17 00:00:00 2001 From: Rachel Elledge Date: Fri, 22 May 2026 15:50:09 -0500 Subject: [PATCH] DOC-6617 RS: Added warning against writing to Replica Of destination and instructions to enforce read-only access --- .../import-export/replica-of/_index.md | 4 +++ .../import-export/replica-of/create.md | 27 +++++++++++++++++++ .../import-export/replica-of/_index.md | 4 +++ .../import-export/replica-of/create.md | 27 +++++++++++++++++++ 4 files changed, 62 insertions(+) diff --git a/content/operate/rs/7.22/databases/import-export/replica-of/_index.md b/content/operate/rs/7.22/databases/import-export/replica-of/_index.md index 4deb31fc1c..dadc85e8b7 100644 --- a/content/operate/rs/7.22/databases/import-export/replica-of/_index.md +++ b/content/operate/rs/7.22/databases/import-export/replica-of/_index.md @@ -22,6 +22,10 @@ all write commands are synchronized from the sources to the destination. Replica Of lets you distribute the read load of your application across multiple databases or synchronize the database, either within Redis Enterprise or external to Redis Enterprise, to another database. +{{< warning >}} +Do not write directly to a Replica Of destination database, because it can result in replication errors, data inconsistencies, or data loss. See [Enforce read-only access]({{}}) for details and instructions. +{{< /warning >}} + You can [create Active-Passive]({{< relref "/operate/rs/7.22/databases/import-export/replica-of/create.md" >}}) databases on Redis Enterprise Software or Redis Cloud. [Active-Active Geo-Distribution (CRDB)]({{< relref "/operate/rs/7.22/databases/active-active" >}}) diff --git a/content/operate/rs/7.22/databases/import-export/replica-of/create.md b/content/operate/rs/7.22/databases/import-export/replica-of/create.md index be77817211..00c500ee25 100644 --- a/content/operate/rs/7.22/databases/import-export/replica-of/create.md +++ b/content/operate/rs/7.22/databases/import-export/replica-of/create.md @@ -146,6 +146,33 @@ To use a database from a Redis Open Source cluster as a Replica Of source: 1. Select **Save**. +### Enforce read-only access + +Writing directly to a Replica Of destination database is not supported and can result in replication errors, data inconsistencies, or data loss. + +As of Redis Software version 7.22.0-95, you can set `replica_read_only` to `true` when you [create a Replica Of database]({{}}) using the REST API. When enabled, the destination database rejects all write operations to prevent accidental writes. Replication remains one-way from source to destination. You cannot change `replica_read_only` after database creation. + +To enforce read-only access when you create a Replica Of destination database: + +```sh +POST https://:/v2/bdbs +{ + "name": "readonly-replica-db", + "memory_size": 1073741824, + "replica_sources": [ + { + "uri": "redis://admin:@:" + } + ], + "replica_read_only": true, + // Additional fields +} +``` + +For additional database configuration fields, see the [BDB object]({{}}) reference. + +For Redis Software versions earlier than 7.22.0-95, there is no product-level enforcement preventing writes to the destination database, so you should configure your application to direct all write operations exclusively to the source database. + ## 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. diff --git a/content/operate/rs/databases/import-export/replica-of/_index.md b/content/operate/rs/databases/import-export/replica-of/_index.md index fb7054d898..41d09e453a 100644 --- a/content/operate/rs/databases/import-export/replica-of/_index.md +++ b/content/operate/rs/databases/import-export/replica-of/_index.md @@ -21,6 +21,10 @@ all write commands are synchronized from the sources to the destination. Replica Of lets you distribute the read load of your application across multiple databases or synchronize the database, either within Redis Software or external to Redis Software, to another database. +{{< warning >}} +Do not write directly to a Replica Of destination database, because it can result in replication errors, data inconsistencies, or data loss. See [Enforce read-only access]({{}}) for details and instructions. +{{< /warning >}} + You can [create Active-Passive]({{< relref "/operate/rs/databases/import-export/replica-of/create.md" >}}) databases on Redis Software or Redis Cloud. [Active-Active Geo-Distribution (CRDB)]({{< relref "/operate/rs/databases/active-active" >}}) diff --git a/content/operate/rs/databases/import-export/replica-of/create.md b/content/operate/rs/databases/import-export/replica-of/create.md index 906a122da6..3d3447de95 100644 --- a/content/operate/rs/databases/import-export/replica-of/create.md +++ b/content/operate/rs/databases/import-export/replica-of/create.md @@ -145,6 +145,33 @@ To use a database from a Redis Open Source cluster as a Replica Of source: 1. Select **Save**. +### Enforce read-only access + +Writing directly to a Replica Of destination database is not supported and can result in replication errors, data inconsistencies, or data loss. + +As of Redis Software version 7.22.0-95, you can set `replica_read_only` to `true` when you [create a Replica Of database]({{}}) using the REST API. When enabled, the destination database rejects all write operations to prevent accidental writes. Replication remains one-way from source to destination. You cannot change `replica_read_only` after database creation. + +To enforce read-only access when you create a Replica Of destination database: + +```sh +POST https://:/v2/bdbs +{ + "name": "readonly-replica-db", + "memory_size": 1073741824, + "replica_sources": [ + { + "uri": "redis://admin:@:" + } + ], + "replica_read_only": true, + // Additional fields +} +``` + +For additional database configuration fields, see the [BDB object]({{}}) reference. + +For Redis Software versions earlier than 7.22.0-95, there is no product-level enforcement preventing writes to the destination database, so you should configure your application to direct all write operations exclusively to the source database. + ## 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.