Step 1 of the migration — the version upgrade. It follows Redis's official rolling upgrade: replace old nodes one at a time with new-version replicas, then do a planned failover, with no downtime.
The main flow uses standalone master/replica; Redis Cluster differences are in the supplement at the end.
Reference: Redis official Redis administration · Upgrading without downtime.
maxmemory and eviction policy, AOF / RDB policy, requirepass / masterauth, connections and timeouts, TLS, replication backlog (sized to memory).BGSAVE; record topology and connection / latency baselines.The main risks during upgrade / adding replicas are a full-resync loop and master pressure spikes. The following help make rolling failover smoother (tune values by data size — do not copy numbers):
| Config | Purpose |
|---|---|
repl-backlog-size |
Enables partial resync after a disconnect, avoiding a full resync |
client-output-buffer-limit replica … |
Prevents the replica output buffer from overflowing and being dropped under heavy writes + initial sync (which causes a resync loop) |
repl-diskless-sync / -delay |
On slow disks, streams the full sync over the network without hitting disk, easing master disk pressure |
repl-timeout |
Raise for large datasets / slow links to avoid false timeouts triggering resync |
maxmemory headroom |
Memory can reach ~2× during sync / RDB; leave headroom to avoid OOM |
Safety prerequisites (not tuning): the master has persistence enabled or does not auto-restart on crash; upgrade replicas via SHUTDOWN (save & quit) for partial resync; promote with REPLICAOF NO ONE — do not enable a writable replica as an intermediary step.
Rationale: Redis official Replication and Administration docs.
Key actions (example commands, adjust per environment)
REPLICAOF <old-master-ip> <port> (set masterauth first if needed); wait for initial sync to finish.INFO replication shows master_link_status:up, offset aligned with the master, stable lag.CLIENT PAUSE WRITE <ms> to briefly pause writes (Redis 6.2+).master_repl_offset from INFO replication.REPLICAOF NO ONE on the 7.2 replica to promote it.7.2 can load a 6.x RDB (forward-compatible), so "7.2 replicating from an old 6.x master" works fine.
Cluster can reuse the "per-shard add replica, catch up, manual failover" idea, but a separate dry run before production is recommended — do not extrapolate single-instance results to Cluster.
Same core flow; the differences are commands and cutover:
CLUSTER MEET to join, then CLUSTER REPLICATE <master-node-id>.CLUSTER FAILOVER, one shard at a time (verify cluster_state:ok, role:master before the next). CLUSTER FAILOVER already pauses the primary, ships the offset, and waits for the replica to catch up before completing, so you don't add a bare CLIENT PAUSE on top; by default do not use FORCE / TAKEOVER. Slots stay with the promoted node.| Stage | Check | Pass criteria |
|---|---|---|
| Before | health / version / replication | replication OK (Cluster: cluster_state:ok) |
| After add replica | catch-up | master_link_status:up, offset aligned |
| After failover | new master role | role:master (Cluster: cluster_state:ok) |
| Throughout | sample consistency | sampled Key + Value + TTL match |
| Soak | latency / errors / connections / memory | no clear regression, no ERROR logs |
CLUSTER FAILOVER back).Back to Migration overview · Next: Redis 7.2 → Engula.