Scrivio Interview library
ScenarioIntermediate6 min read · updated 13 November 2026

A team runs a self-managed Redis 6.2 primary with two replicas and Sentinel, holding 25 GB with AOF on. It plans an in-place upgrade to 7.2 on a weekday evening with traffic still flowing.

Plan the upgrade: which changes between 6.2 and 7.2 matter, in which order do you upgrade the nodes, and how do you keep a way back?

Between 6.2 and 7.2 the changes that matter are listpack replacing ziplist (old config names still work as aliases), AOF becoming multi-part in a directory with a manifest, some ACL and command behaviour changes, and the need for client versions tested with 7.x. We upgrade one replica at a time, fail over through Sentinel to a 7.2 replica, upgrade the old primary last, upgrade the Sentinels, and finish promptly because a newer primary cannot replicate to an older replica. The way back is an RDB backup taken on 6.2 before we start, accepting that writes after cutover are lost if we restore it.

Why this question is asked

An in-place major upgrade with traffic flowing is routine for many teams and still goes wrong regularly, mostly because of the rollback path nobody planned. Interviewers ask this to see whether we know the ordering rules of Redis replication and are honest about what can and cannot be undone. In this answer, we will go through the changes between 6.2 and 7.2 worth reviewing, the order in which to upgrade the five processes, why we must not linger with mixed versions, how to keep a way back, and how to run the evening itself.

1What Changed Between 6.2 and 7.2

Redis 7.0 replaced ziplist, the old compact encoding for small hashes, lists and sorted sets, with listpack. Configuration names changed accordingly, for example hash-max-ziplist-entries became hash-max-listpack-entries, but the old names still work as aliases, so an existing redis.conf loads. The data is converted as it is loaded.

AOF, the append-only file, became multi-part. Instead of one appendonly.aof, Redis 7 keeps a directory, named by the appenddirname setting and appendonlydir by default, containing a base file, incremental files and a manifest that lists them. Redis 7 converts an old single AOF on first start, but backup scripts, disk monitoring and anything that copies appendonly.aof must be updated. With 25 GB and AOF on, also check that the disk has room for the conversion.

Some security and command behaviours changed too. For example, new ACL users no longer get access to all pub/sub channels by default (acl-pubsub-default became resetchannels), and several commands changed details. We read the release notes for 7.0 and 7.2 for each command our services use, which INFO commandstats lists, and confirm that our Lettuce or Jedis versions are ones tested against 7.x.

2The Order: Replicas, Failover, Old Primary, Sentinels

Replication works from an older primary to a newer replica, but not the other way round. So we always upgrade replicas before the primary that feeds them.

Step throughUpgrade sequence for one primary, two replicas and Sentinel
  1. Take an RDB backup on 6.2Copy it off the host
  2. Upgrade replica 1 to 7.2Restart, full resync, verify
  3. Upgrade replica 2 to 7.2Restart, full resync, verify
  4. SENTINEL FAILOVER mymasterA 7.2 replica becomes primary
  5. Clients follow the new primary?Check connections and errors
    YesContinueNoStop and investigate
  6. Upgrade old primary to 7.2It rejoins as a replica
  7. Upgrade the Sentinel processesOne at a time, keep quorum

7 steps in order. Play them, or step through them one at a time.

After step 4 there is no easy way back to 6.2 replication.

3Each Step in Detail

For each replica, we stop Redis, install 7.2, start it with the same configuration, and let it resync from the 6.2 primary. With 25 GB this is a full synchronisation: the primary forks, writes a snapshot and streams it, which takes minutes and needs memory headroom on the primary for copy-on-write. We verify with INFO replication that master_link_status is up and the offset is catching up, and check the replica's log for warnings, before touching the next one.

Then we fail over deliberately with SENTINEL FAILOVER, rather than by killing the primary, so Sentinel promotes a fully synced 7.2 replica and clients are told the new address. Lettuce and Jedis Sentinel clients reconnect to the new primary; clients pointed at a fixed IP would not, which is one more thing to confirm in the rehearsal.

Finally we upgrade the old primary, which now rejoins as a replica of the 7.2 primary, and then the three Sentinel processes, one at a time so the quorum is never lost.

4Why We Do Not Stay in Mixed Versions

Once a 7.2 node is primary, any remaining 6.2 replica is replicating from a newer version, which Redis does not support. It may appear to work for a while, then fail on a full resync because 6.2 cannot read the RDB that 7.2 sends, at the worst moment. So after the failover we finish the remaining nodes in the same evening rather than leaving them for days.

5Keeping a Way Back

Rollback is the hard part, and the honest plan says so. Redis 7.2 writes a newer RDB format that 6.2 cannot load, and its multi-part AOF is not readable by 6.2 either. So once the cluster runs on 7.2 we cannot simply reinstall 6.2 on the same data.

The way back is the RDB backup we took on 6.2 before starting: BGSAVE, wait for it to finish, copy dump.rdb somewhere safe. If 7.2 misbehaves, we can start 6.2 nodes from that file. But everything written after the backup is lost in that case, so we agree that in advance with the owners of the data. For a cache, losing an evening's writes is fine; for anything else we decide whether that loss is acceptable or whether rollback means a new 6.2 deployment filled by copying keys from 7.2.

Shell
redis-cli BGSAVE # Background saving started
redis-cli INFO persistence | grep rdb_bgsave_in_progress # rdb_bgsave_in_progress:0 when done
cp /var/lib/redis/dump.rdb /backup/redis-6.2-$(date +%F).rdb

6Running the Evening

We rehearse first on a copy of production data, ideally restored from a real backup, with the same configuration and client versions, and time each step. On the night, we choose the lowest-traffic window, watch the logs, latency, error rates and replication lag after each step, and stop at the first surprise. Clients must be set up to follow Sentinel and to retry briefly, because the failover still causes a short pause in writes.

7Follow-up questions

How do you confirm that every client reconnected to the new primary?

On the old primary, now a replica, run CLIENT LIST and check that the only remaining connections are replication and Sentinel, not application clients; any application connection still there is pointed at the wrong node and will get READONLY errors on writes. On the new primary, connected_clients in INFO clients should match the expected count. On the application side, error rates and READONLY errors in logs should be zero, and client metrics should show the new address.

Could we use a blue-green approach instead?

Yes: build a new 7.2 deployment, make it replicate from the 6.2 primary, and switch clients when it has caught up. That keeps the old deployment intact as a fallback until we stop the replication, at the cost of double hardware for the evening.

Why fail over with SENTINEL FAILOVER rather than restarting the primary?

A planned failover promotes a replica that is in sync and tells clients the new address in a controlled way. Restarting the primary forces Sentinel to detect a failure first, which takes longer and may lose writes acknowledged just before the restart.

8Conclusion

In this answer, we saw that the 6.2 to 7.2 upgrade means reviewing listpack, multi-part AOF, ACL and command changes and client versions. We upgrade replicas one by one, fail over through Sentinel, upgrade the old primary last and then the Sentinels, and finish promptly because newer-to-older replication is not supported. Rollback rests on an RDB taken on 6.2 before starting, with the agreed loss of later writes, and the evening is rehearsed on production-like data and watched step by step.

What to say in the interviewAbout 80 seconds aloud

Open with

First I would review what changed: listpack replaced ziplist, though the old config names still work as aliases; AOF became multi-part in a directory with a manifest, so backup scripts and disk space need checking with 25 GB; some ACL defaults and command behaviours changed; and our client libraries should be versions tested with 7.x.

Then, if they want more

Before starting I would take a BGSAVE on 6.2 and copy the RDB off the host, because 6.2 cannot load files written by 7.2, so that backup is the only way back, and any writes after cutover would be lost if we used it. That needs agreeing with the data owners.

Then I upgrade one replica, let it fully resync and verify replication status, then the second one. I fail over with SENTINEL FAILOVER so a 7.2 replica becomes primary, confirm the clients followed, upgrade the old primary, and finally the Sentinels one at a time.

I would not leave a 6.2 node replicating from 7.2, because that direction is not supported, so I finish the same evening. And I would rehearse the whole thing on a copy with production data and pick the quietest window, watching logs, latency and errors after every step.

About this answer

Last updated
13 November 2026
Versions it names
Redis 7
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Official documentation
Redis documentation
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Plan the upgrade: which changes between 6.2 and 7.2 matter, in which order do you...": https://scrivio-interview-library.netlify.app/databases/redis-internals/b7ef2d4ee2/