Command Support
Which Redis commands are replicated across datacenters, which execute locally and never leave the datacenter, and which are refused with an error.
On Redis 7.2 the same replication module serves both Disaster Recovery (peerof) and Active-Active (mesh), and it classifies every command identically in both modes. What the mode changes is which members accept application writes, and therefore how often the conflict-resolution behavior below is actually exercised.
Redis 6.0 runs the legacy module, which supports Disaster Recovery only, replicates a smaller command set, and applies none of the guards. See Redis 6.0 — the legacy module.
TOC
Summary by modeRefused with an errorExecuted locally, never replicatedReplicated write commandsStringsHashesSetsSorted setsListsKeyspaceBitmaps, HyperLogLog, and geospatialScripting and functionsBehavior that differs from standalone RedisAt-least-once popsNo cross-datacenter atomicityWrites of different types to one key resolve silentlyDeleted data occupies memory until every member has acknowledged itThe module's bookkeeping keys are visibleRedis 6.0 — the legacy moduleRelated pagesSummary by mode
The refusals are enforced by the module's command filter, which is installed whenever cross-datacenter replication is enabled on Redis 7.2. A MOVE, SWAPDB, or RESTORE therefore fails on a Disaster Recovery instance exactly as it does on an Active-Active member, even though a Disaster Recovery instance has a single writer. Applications that rely on these commands must be changed before the instance joins a replication group.
Refused with an error
These commands do not execute at all on Redis 7.2. The client receives an error and nothing is written locally or replicated.
The errors are, respectively:
To empty a replication group, remove the connections (or the ActiveRedisMesh resources), flush each isolated instance, then re-create them. Alternatively, recreate the instances.
FUNCTION RESTORE is not in this list — it is supported. Only the key-level RESTORE is refused.
Executed locally, never replicated
These commands run exactly as they do on unmodified Redis. There is no error and no rejection — they simply produce no cross-datacenter effect, so each datacenter's state for them is independent.
Because a peer's same-named key is an unrelated local stream, generic key commands are prevented from crossing datacenters when they touch a stream key:
- Setting a TTL on a stream key is refused — a replicated expiry would delete a peer's unrelated local stream.
PERSISTon a stream key executes locally but does not replicate.DEL,RENAME, andCOPYinvolving a stream key are not replicated.
Replicated write commands
Everything listed here is replicated to every other member of the replication group. The Conflict behavior column describes how two members that wrote the same key at the same time are reconciled. In Disaster Recovery mode only the upstream takes application writes, so these rules apply but are rarely exercised; in Active-Active mode they are exercised continuously.
Five conflict rules are used throughout:
Strings
Hashes
Sets
Sorted sets
Lists
Pops are at-least-once: the same element can be popped in two datacenters before they synchronize. Consume from a single datacenter, or make consumers idempotent.
Keyspace
Bitmaps, HyperLogLog, and geospatial
Scripting and functions
Because each write a script performs is replicated on its own, a script is subject to the same per-command rules as any other client. A script that is not idempotent is not made idempotent by being a script.
Behavior that differs from standalone Redis
Design application logic around these. They are consequences of the replication model, not defects.
At-least-once pops
LPOP, RPOP, SPOP, ZPOPMIN, ZPOPMAX, and their blocking and multi-key variants are exactly-once on a single member but at-least-once across the replication group. Two members popping concurrently, before they synchronize, can each consume the same element. Consume from a single member, or make consumers idempotent.
No cross-datacenter atomicity
MULTI/EXEC, MSET, and MSETNX are replicated per key or per command. The keys all arrive and the members converge, but peers do not apply the group atomically — a peer can briefly observe part of a transaction.
Writes of different types to one key resolve silently
Concurrent writes of different types to the same key (SET key in one datacenter, HSET key in another) resolve by timestamp, with ties broken by the higher serviceID. The loser's data is discarded without a merge and without an error.
Deleted data occupies memory until every member has acknowledged it
Deletions are retained as tombstones — records that a key, field, or element was deleted — so that a delayed write from a peer cannot resurrect deleted data. A tombstone is released only after every active peer has acknowledged it and a minimum age of five minutes has passed. A peer that is unreachable for a long time therefore holds tombstones alive on every other member — decommission a datacenter that is gone for good, as described in Limitations and Risks. Large clock skew narrows this protection; see Clock synchronization.
The module's bookkeeping keys are visible
The module stores some replication bookkeeping as ordinary Redis keys under the reserved __arcr_ prefix. They are counted by DBSIZE and returned by SCAN and KEYS until they are collected, and they are derived independently on each member, so their number and timing legitimately differ between datacenters. Any tooling that compares datasets across datacenters must exclude the whole __arcr_ prefix. Applications must not write to it.
Redis 6.0 — the legacy module
Redis 6.0 runs the frozen legacy module and supports Disaster Recovery only. Its behavior differs from Redis 7.2 in two ways that matter operationally.
It replicates a smaller set of commands. The commands it replicates are:
Commands introduced after Redis 6.0, and the commands listed under Executed locally, never replicated, are not replicated by the legacy module — including all stream commands, pub/sub, MIGRATE, and the MULTI/EXEC boundary.
It has none of the guards. The legacy module does not refuse any command. FLUSHALL, FLUSHDB, MOVE, SWAPDB, and RESTORE are wrapped and replicated to the downstream instead of being rejected.
Because the legacy module replicates them, a FLUSHALL or FLUSHDB issued on a Redis 6.0 upstream also empties every downstream instance. There is no confirmation and no error. Treat both commands as destructive across the whole replication group on Redis 6.0, and consider restricting them with an ACL.
On Redis 7.2 the same commands are refused while peers are attached — see Refused with an error.
To move an existing Redis 6.0 group onto the new module, follow Upgrade a Disaster Recovery Group from Redis 6.0 to Redis 7.2.
Related pages
- Limitations and Risks — topology, configuration, and operational constraints
- Disaster Recovery — the hot-standby mode, where a single member takes the writes
- Active-Active — the mode that exercises these rules continuously, including the clock synchronization requirement