1"use strict";(self.webpackChunkengula_website=self.webpackChunkengula_website||[]).push([["6567"],{5464:function(e,n,r){r.r(n),r.d(n,{default:()=>d});var s=r(2676),i=r(453);function t(e){let n=Object.assign({h1:"h1",a:"a",p:"p",strong:"strong",blockquote:"blockquote",hr:"hr",h2:"h2",ul:"ul",li:"li",code:"code",h3:"h3",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td",pre:"pre",ol:"ol"},(0,i.ah)(),e.components);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.h1,{id:"redis-6x--72-rolling-upgrade",children:["Redis 6.x â 7.2 rolling upgrade",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#redis-6x--72-rolling-upgrade",children:"#"})]}),"\n",(0,s.jsxs)(n.p,{children:["Step 1 of the migration â the version upgrade. It follows Redis's official ",(0,s.jsx)(n.strong,{children:"rolling upgrade"}),": replace old nodes one at a time with new-version replicas, then do a planned failover, with no downtime."]}),"\n",(0,s.jsxs)(n.p,{children:["The main flow uses ",(0,s.jsx)(n.strong,{children:"standalone master/replica"}),"; ",(0,s.jsx)(n.strong,{children:"Redis Cluster"})," differences are in the supplement at the end."]}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["Reference: Redis official ",(0,s.jsx)(n.a,{href:"https://redis.io/docs/latest/operate/oss_and_stack/management/admin/",target:"_blank",rel:"noopener noreferrer",children:"Redis administration \xb7 Upgrading without downtime"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"applicability--prerequisites",children:["Applicability & prerequisites",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#applicability--prerequisites",children:"#"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Scenario: Redis 6.x (first align to 6.2.x within the major version) rolling-upgraded to 7.2.x."}),"\n",(0,s.jsx)(n.li,{children:"Prerequisites: replication healthy and planned failover possible; the master has persistence enabled or does not auto-restart on crash (to avoid an empty master wiping replicas)."}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"before-the-upgrade",children:["Before the upgrade",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#before-the-upgrade",children:"#"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Config alignment"})," (old and new consistent): ",(0,s.jsx)(n.code,{children:"maxmemory"})," and eviction policy, AOF / RDB policy, ",(0,s.jsx)(n.code,{children:"requirepass"})," / ",(0,s.jsx)(n.code,{children:"masterauth"}),", connections and timeouts, TLS, replication backlog (sized to memory)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Compatibility check (high level)"}),": inventory production commands / usage from real command logs (Lua, Streams, blocking commands, Module, etc.); verify high-frequency and high-risk usage. No need to compare full version-diff lists."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Backup & baseline"}),": run one ",(0,s.jsx)(n.code,{children:"BGSAVE"}),"; record topology and connection / latency baselines."]}),"\n"]}),"\n",(0,s.jsxs)(n.h3,{id:"upgrade-friendly-configuration-optional",children:["Upgrade-friendly configuration (optional)",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#upgrade-friendly-configuration-optional",children:"#"})]}),"\n",(0,s.jsxs)(n.p,{children:["The main risks during upgrade / adding replicas are a ",(0,s.jsx)(n.strong,{children:"full-resync loop"})," and master pressure spikes. The following help make rolling failover smoother (",(0,s.jsx)(n.strong,{children:"tune values by data size â do not copy numbers"}),"):"]}),"\n",(0,s.jsxs)(n.table,{children:["\n",(0,s.jsxs)(n.thead,{children:["\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.th,{children:"Config"}),"\n",(0,s.jsx)(n.th,{children:"Purpose"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.tbody,{children:["\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"repl-backlog-size"})}),"\n",(0,s.jsx)(n.td,{children:"Enables partial resync after a disconnect, avoiding a full resync"}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"client-output-buffer-limit replica â¦"})}),"\n",(0,s.jsx)(n.td,{children:"Prevents the replica output buffer from overflowing and being dropped under heavy writes + initial sync (which causes a resync loop)"}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"repl-diskless-sync"})," / ",(0,s.jsx)(n.code,{children:"-delay"})]}),"\n",(0,s.jsx)(n.td,{children:"On slow disks, streams the full sync over the network without hitting disk, easing master disk pressure"}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"repl-timeout"})}),"\n",(0,s.jsx)(n.td,{children:"Raise for large datasets / slow links to avoid false timeouts triggering resync"}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"maxmemory"})," headroom"]}),"\n",(0,s.jsx)(n.td,{children:"Memory can reach ~2\xd7 during sync / RDB; leave headroom to avoid OOM"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Safety prerequisites (not tuning): the master has persistence enabled or ",(0,s.jsx)(n.strong,{children:"does not auto-restart on crash"}),"; upgrade replicas via ",(0,s.jsx)(n.code,{children:"SHUTDOWN"})," (save & quit) for partial resync; promote with ",(0,s.jsx)(n.code,{children:"REPLICAOF NO ONE"})," â ",(0,s.jsx)(n.strong,{children:"do not enable a writable replica as an intermediary step"}),"."]}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:["Rationale: Redis official ",(0,s.jsx)(n.a,{href:"https://redis.io/docs/latest/operate/oss_and_stack/management/replication/",target:"_blank",rel:"noopener noreferrer",children:"Replication"})," and ",(0,s.jsx)(n.a,{href:"https://redis.io/docs/latest/operate/oss_and_stack/management/admin/",target:"_blank",rel:"noopener noreferrer",children:"Administration"})," docs."]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"upgrade-flow-main-standalone-masterreplica",children:["Upgrade flow (main: standalone master/replica)",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#upgrade-flow-main-standalone-masterreplica",children:"#"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"â Add 7.2 replica New 7.2 instance replicates from the old 6.x master; catch up\nâ¡ Verify Same key count, master_link_status:up, offset aligned\n⢠(optional) load test\n⣠Failover Pause writes â wait replica to catch up offset â promote 7.2 â repoint clients\n⤠Soak Keep the old 6.x node (
1duration up to you); run the checklist\n⥠Wrap up Retire the old 6.x node\n"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Key actions (example commands, adjust per environment)"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Add replica: on the new 7.2 instance, ",(0,s.jsx)(n.code,{children:"REPLICAOF <old-master-ip> <port>"})," (set ",(0,s.jsx)(n.code,{children:"masterauth"})," first if needed); wait for initial sync to finish."]}),"\n",(0,s.jsxs)(n.li,{children:["Catch-up check: ",(0,s.jsx)(n.code,{children:"INFO replication"})," shows ",(0,s.jsx)(n.code,{children:"master_link_status:up"}),", offset aligned with the master, stable lag."]}),"\n",(0,s.jsxs)(n.li,{children:["Failover (establish a consistency point, then promote):","\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["On the old master, ",(0,s.jsx)(n.code,{children:"CLIENT PAUSE WRITE <ms>"})," to briefly pause writes (Redis 6.2+)."]}),"\n",(0,s.jsxs)(n.li,{children:["Record the old master's ",(0,s.jsx)(n.code,{children:"master_repl_offset"})," from ",(0,s.jsx)(n.code,{children:"INFO replication"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Wait for the 7.2 replica's offset to reach that value (confirming it processed the stream up to the pause)."}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"REPLICAOF NO ONE"})," on the 7.2 replica to promote it."]}),"\n",(0,s.jsx)(n.li,{children:"Repoint clients to the new master."}),"\n",(0,s.jsx)(n.li,{children:"Take the old master out of write service; if soaking, decide its fate per the rollback plan."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsx)(n.p,{children:'7.2 can load a 6.x RDB (forward-compatible), so "7.2 replicating from an old 6.x master" works fine.'}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"redis-cluster-supplement",children:["Redis Cluster supplement",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#redis-cluster-supplement",children:"#"})]}),"\n",(0,s.jsxs)(n.blockquote,{children:["\n",(0,s.jsxs)(n.p,{children:['Cluster can reuse the "per-shard add replica, catch up, manual failover" idea, but ',(0,s.jsx)(n.strong,{children:"a separate dry run before production is recommended"})," â do not extrapolate single-instance results to Cluster."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Same core flow; the differences are commands and cutover:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Add replica"}),": new 7.2 node ",(0,s.jsx)(n.code,{children:"CLUSTER MEET"})," to join, then ",(0,s.jsx)(n.code,{children:"CLUSTER REPLICATE <master-node-id>"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Failover"}),": on the target 7.2 replica, ",(0,s.jsx)(n.code,{children:"CLUSTER FAILOVER"}),", ",(0,s.jsx)(n.strong,{children:"one shard at a time"})," (verify ",(0,s.jsx)(n.code,{children:"cluster_state:ok"}),", ",(0,s.jsx)(n.code,{children:"role:master"})," before the next). ",(0,s.jsx)(n.code,{children:"CLUSTER FAILOVER"})," already pauses the primary, ships the offset, and waits for the replica to catch up before completing, so you ",(0,s.jsx)(n.strong,{children:"don't"})," add a bare ",(0,s.jsx)(n.code,{children:"CLIENT PAUSE"})," on top; by default ",(0,s.jsx)(n.strong,{children:"do not use"})," ",(0,s.jsx)(n.code,{children:"FORCE"})," / ",(0,s.jsx)(n.code,{children:"TAKEOVER"}),". Slots stay with the promoted node."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Cutover"}),": Cluster clients follow the topology automatically â ",(0,s.jsx)(n.strong,{children:"no manual repointing"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Retirement order"}),": remove the old 6.x replicas first, the old 6.x master last."]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"verification-checkpoints",children:["Verification checkpoints",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#verification-checkpoints",children:"#"})]}),"\n",(0,s.jsxs)(n.table,{children:["\n",(0,s.jsxs)(n.thead,{children:["\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.th,{children:"Stage"}),"\n",(0,s.jsx)(n.th,{children:"Check"}),"\n",(0,s.jsx)(n.th,{children:"Pass criteria"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.tbody,{children:["\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:"Before"}),"\n",(0,s.jsx)(n.td,{children:"health / version / replication"}),"\n",(0,s.jsxs)(n.td,{children:["replication OK (Cluster: ",(0,s.jsx)(n.code,{children:"cluster_state:ok"}),")"]}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:"After add replica"}),"\n",(0,s.jsx)(n.td,{children:"catch-up"}),"\n",(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"master_link_status:up"}),", offset aligned"]}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:"After failover"}),"\n",(0,s.jsx)(n.td,{children:"new master role"}),"\n",(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"role:master"})," (Cluster: ",(0,s.jsx)(n.code,{children:"cluster_state:ok"}),")"]}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:"Throughout"}),"\n",(0,s.jsx)(n.td,{children:"sample consistency"}),"\n",(0,s.jsx)(n.td,{children:"sampled Key + Value + TTL match"}),"\n"]}),"\n",(0,s.jsxs)(n.tr,{children:["\n",(0,s.jsx)(n.td,{children:"Soak"}),"\n",(0,s.jsx)(n.td,{children:"latency / errors / connections / memory"}),"\n",(0,s.jsx)(n.td,{children:"no clear regression, no ERROR logs"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.h2,{id:"rollback",children:["Rollback",(0,s.jsx)(n.a,{className:"header-anchor","aria-hidden":"true",href:"#rollback",children:"#"})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Rever
1sible during the soak"}),": re-promote the original 6.x master and repoint clients (Cluster: ",(0,s.jsx)(n.code,{children:"CLUSTER FAILOVER"})," back)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Two cross-major-version constraints"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The old 6.x ",(0,s.jsx)(n.strong,{children:"cannot load a 7.2 RDB"}),', so it cannot stably replicate from 7.2 (any full resync would fail). The kept old node is only a "snapshot at cutover time" â ',(0,s.jsx)(n.strong,{children:"do not restart / rebuild old nodes during the soak"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Therefore a rollback ",(0,s.jsx)(n.strong,{children:"loses writes made to 7.2 after cutover"}),". For consistency-sensitive workloads, ",(0,s.jsx)(n.strong,{children:"briefly freeze writes"})," at cutover to minimize the rollback inconsistency window."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.hr,{}),"\n",(0,s.jsxs)(n.p,{children:["Back to ",(0,s.jsx)(n.a,{href:"/en/docs/migration/overview",children:"Migration overview"})," \xb7 Next: ",(0,s.jsx)(n.a,{href:"/en/docs/migration/migrate-7-to-engula",children:"Redis 7.2 â Engula"}),"."]})]})}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:n}=Object.assign({},(0,i.ah)(),e.components);return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(t,{...e})}):t(e)}let d=l;l.__RSPRESS_PAGE_META={},l.__RSPRESS_PAGE_META["en%2Fdocs%2Fmigration%2Fupgrade-6-to-7.md"]={toc:[{text:"Applicability & prerequisites",id:"applicability--prerequisites",depth:2},{text:"Before the upgrade",id:"before-the-upgrade",depth:2},{text:"Upgrade-friendly configuration (optional)",id:"upgrade-friendly-configuration-optional",depth:3},{text:"Upgrade flow (main: standalone master/replica)",id:"upgrade-flow-main-standalone-masterreplica",depth:2},{text:"Redis Cluster supplement",id:"redis-cluster-supplement",depth:2},{text:"Verification checkpoints",id:"verification-checkpoints",depth:2},{text:"Rollback",id:"rollback",depth:2}],title:"Redis 6.x â 7.2 rolling upgrade",headingTitle:"Redis 6.x â 7.2 rolling upgrade",frontmatter:{}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.