PageSourceSearch

https://montplex.com/static/js/async/7414.e98c4d86.js

js montplex.com collected 2026-10-03 21:17:36 UTC 14,577 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkengula_website=self.webpackChunkengula_website||[]).push([["7414"],{3034:function(n,s,e){e.r(s),e.d(s,{default:()=>h});var r=e(2676),l=e(453);function i(n){let s=Object.assign({h1:"h1",a:"a",p:"p",strong:"strong",blockquote:"blockquote",hr:"hr",h2:"h2",pre:"pre",code:"code",ul:"ul",li:"li",table:"table",thead:"thead",tr:"tr",th:"th",tbody:"tbody",td:"td"},(0,l.ah)(),n.components);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.h1,{id:"迁移到-engula--总览",children:["迁移到 Engula \xb7 总览",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#迁移到-engula--总览",children:"#"})]}),"\n",(0,r.jsxs)(s.p,{children:["Engula 与 Redis 7.2 可视为平替:协议、命令集与复制行为一致,",(0,r.jsx)(s.strong,{children:"可互为主从"}),",现有客户端代码、SDK 与运维工具基本无需改造。因此把线上 Redis / Valkey 迁移到 Engula,可以复用大家熟悉的 ",(0,r.jsx)(s.strong,{children:"Redis 滚动升级(副本 + 计划性切主)"})," 流程,一路平滑切换,并保留可回退路径(两步的回退口径不同,见下)。"]}),"\n",(0,r.jsxs)(s.blockquote,{children:["\n",(0,r.jsx)(s.p,{children:"本文只给方法与要点;具体命令、参数因部署形态(单实例主从 / Cluster)与环境而异,落地可结合 Engula 支持团队细化。"}),"\n"]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.h2,{id:"迁移思路一次只引入一个变量",children:["迁移思路:一次只引入一个变量",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#迁移思路一次只引入一个变量",children:"#"})]}),"\n",(0,r.jsxs)(s.p,{children:["从较老的 Redis(如 6.x)迁移到 Engula,通常同时跨越两件事:",(0,r.jsx)(s.strong,{children:"Redis 版本差异"}),"与",(0,r.jsx)(s.strong,{children:"引擎差异"}),"。两个变量叠加会让出问题时难以定位。推荐",(0,r.jsx)(s.strong,{children:"两步走"}),",每步只引入一个变量、都可回退(但两步的回退口径不同):"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{children:"Redis 6.x  ──①版本升级──▶  Redis 7.2  ──②引擎迁移──▶  Engula\n             (纯版本升级)       观察期        (纯引擎迁移)\n"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"第一步:Redis 6.x → 7.2"}),' —— 纯版本升级,走 Redis 官方滚动升级实践。回退口径是"回到切主点":旧 6.x 无法加载 7.2 的 RDB,切回后、切主之后写入 7.2 的增量不会回到 6.x。见 ',(0,r.jsx)(s.a,{href:"/docs/migration/upgrade-6-to-7",children:"Redis 6.x → 7.2 升级"}),"。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"稳定观察期"})," —— 建议覆盖至少一个完整业务周期(含周末 / 大促 / 结算等峰值),时长由业务定。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"第二步:Redis 7.2 → Engula"})," —— 纯引擎迁移。因 Engula 与 7.2 平替、可互为主从,Redis 可作 Engula 的热备从持续跟随,回退更干净。见 ",(0,r.jsx)(s.a,{href:"/docs/migration/migrate-7-to-engula",children:"Redis 7.2 → Engula 迁移"}),"。"]}),"\n"]}),"\n",(0,r.jsxs)(s.blockquote,{children:["\n",(0,r.jsx)(s.p,{children:'两步都能回退,但含义不同:第一步是"回到切主点"(非无损,会丢切主后写入 7.2 的增量);第二步 Redis 作 Engula 的热备从、回退更干净。若业务简单(如纯缓存、可从数据库重建),也可评估直接迁移;两步走是更稳健的默认建议。'}),"\n"]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.h2,{id:"推荐方式滚动切主副本--failover",children:["推荐方式:滚动切主(副本 + Failover)",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#推荐方式滚动切主副本--failover",children:"#"})]}),"\n",(0,r.jsx)(s.p,{children:"由于 Engula 与 Redis 7.2 互为主从,两步都用同一套成熟机制:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{children:"加新节点为从 ──▶ 追平复制 ──▶ 计划性切主 ──▶ 观察期(保留旧节点) ──▶ 下线旧节点\n"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"不需要双写、不依赖特殊接入层"}),",链路短、成本低。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"蓝绿变体"}),":切主后保留旧版本 / 旧引擎节点作为从,进入观察期;无问题再移除,有问题可快速切回。"]}),"\n",(0,r.jsxs)(s.li,{children:["适用于",(0,r.jsx)(s.strong,{children:"单实例主从"}),"与 ",(0,r.jsx)(s.strong,{children:"Redis Cluster"})," 两种形态(Cluster 用 ",(0,r.jsx)(s.code,{children:"CLUSTER FAILOVER"})," 逐 shard 切主;Cluster 建议单独演练验证,见执行文档)。"]}),"\n"]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.h2,{id:"另一种思路代理双写--灰度切读",children:["另一种思路:代理双写 + 灰度切读",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#另一种思路代理双写--灰度切读",children:"#"})]}),"\n",(0,r.jsxs)(s.p,{children:["当无法依赖复制切主、或需要",(0,r.jsx)(s.strong,{children:"按比例灰度读"}),'、跨机房强可控迁移时,业界还有一种"代理双写"思路:']}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{children:"同步(全量+增量) ──▶ 接入层双写(源+目标) ──▶ 按比例灰度切读 ──▶ 观察 ──▶ 关双写、下线源\n"})}),"\n",(0,r.jsxs)(s.p,{children:["它把迁移拆成可观测、可灰度、可秒级回滚的过程,但",(0,r.jsx)(s.strong,{children:"通常无法零开发落地"}),"——需要在接入层 / Proxy 上具备或自建下列能力。下表列出",(0,r.jsx)(s.strong,{children:"开发需求点"}),"及其",(0,r.jsx)(s.strong,{children:"在迁移中的目的"}),":"]}),"\n",(0,r.jsxs)(s.table,{children:["\n",(0,r.jsxs)(s.thead,{children:["\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsx)(s.th,{children:"开发需求点"}),"\n",(0,r.jsx)(s.th,{children:"在迁移中的目的"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.tbody,{children:["\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"双写"}),":写同时打到源与目标"]}),"\n",(0,r.jsx)(s.td,{children:"目标端在切读前持续接住增量写、与源保持同步,为灰度切读做准备"}),"\n"]}),"\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"双写失败处理"}),':区分"源写失败 / 目标写失败"']}),"\n",(0,r.jsx)(s.td,{children:"源写失败即返回失败以保主链路正确性;目标写失败不影响返回但记录"}),"\n"]}),"\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"熔断"}
1),":目标写失败率 / 超时超阈值自动停目标写并告警"]}),"\n",(0,r.jsx)(s.td,{children:"目标端异常时一键降级、保住主链路"}),"\n"]}),"\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"按比例切读"}),":读 10%→30%→…→100% 可调、可秒级切回"]}),"\n",(0,r.jsx)(s.td,{children:"读流量分档灰度,每档验证后再推进,异常立即回退"}),"\n"]}),"\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"幂等 / 重试控制"}),":针对 INCR、LPUSH 等非幂等命令"]}),"\n",(0,r.jsx)(s.td,{children:"双写 + 重试下防止重复写导致计数 / 列表偏差"}),"\n"]}),"\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.strong,{children:"旁路校验"}),":抽样比对 Key + Value + TTL"]}),"\n",(0,r.jsx)(s.td,{children:"持续发现两端不一致并告警,覆盖热点 / 核心 Key"}),"\n"]}),"\n",(0,r.jsxs)(s.tr,{children:["\n",(0,r.jsx)(s.td,{children:(0,r.jsx)(s.strong,{children:"命令审计 / 可观测指标"})}),"\n",(0,r.jsx)(s.td,{children:"提供灰度各档的量化验收依据与问题定位手段"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s.blockquote,{children:["\n",(0,r.jsxs)(s.p,{children:["该方式需结合具体接入层做定制开发,本指南不作为标准执行步骤给出。有此类需求可",(0,r.jsx)(s.a,{href:"mailto:[email protected]?subject=Engula%20%E8%BF%81%E7%A7%BB%E5%92%A8%E8%AF%A2",children:"联系我们"}),"评估。"]}),"\n"]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.h2,{id:"迁移前检查清单",children:["迁移前检查清单",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#迁移前检查清单",children:"#"})]}),"\n",(0,r.jsx)(s.p,{children:"由运维 / DBA 与业务方逐项确认(高层,阈值由业务定):"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"命令与兼容性"}),":用真实命令日志盘点线上实际用到的命令 / 用法(Lua、Streams、阻塞命令、Module 等重点);用 shadow 影子模式镜像生产流量做一致性验证。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"业务特征"}),":命令模式(简单 KV / 复杂结构);Redis 定位(纯缓存可重建 / 主存储不可丢);客户端超时与连接池。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"稳定性要求"}),":是否允许秒级写入闪断;对非幂等命令少量偏差的容忍度;可接受的 P99 上涨倍数。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"资源与窗口"}),":可同时运行的节点数量(新旧并存 + 观察期保留);业务低峰 / 变更冻结窗口。"]}),"\n"]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.h2,{id:"通用风险控制原则",children:["通用风险控制原则",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#通用风险控制原则",children:"#"})]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"先建立一致点,再切主"}),":切主前短暂停写,等目标从追平到旧主的最终复制 offset,再提主。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"回退口径分两步"}),':第一步(6.x→7.2)是"回到切主点"、非无损;第二步(7.2→Engula)Redis 作 Engula 热备从、可较干净回切。切换完成前旧节点始终保有其数据,观察期内不要重启 / 重建旧节点。']}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"计划性优于自动"}),":主动择时切主优于等故障自动切。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"每步即时校验"}),":一次只动一个节点,操作后立即验证复制与集群状态再继续。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"持续校验"}),":抽样比对 Key + Value + TTL,不一致即告警;热点 / 核心 Key 专项校验。"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"需要特别留意"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"跨大版本快照不向后兼容"}),":跨大版本升级后旧版本通常无法加载新版本快照。回滚依赖保留旧节点ï¼
1Œè§‚察期内不要重启 / 重建旧节点。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"非幂等命令"}),":切换 / 重试期间 INCR、LPUSH 等可能重复写,需业务容忍或幂等封装。"]}),"\n"]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.h2,{id:"上线前必须确认",children:["上线前必须确认",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#上线前必须确认",children:"#"})]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"二进制平台与构建匹配(操作系统、CPU 架构、glibc、SHA256 校验)。"}),"\n",(0,r.jsx)(s.li,{children:"备份与恢复演练完成。"}),"\n",(0,r.jsx)(s.li,{children:"监控、告警与日志已接入。"}),"\n",(0,r.jsx)(s.li,{children:"回滚命令与责任人明确。"}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:(0,r.jsx)(s.strong,{children:"版本与授权"})}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Engula Developer Edition"})," —— 最多 6 个 Engula 节点。"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Engula Enterprise"})," —— 用于更大规模或生产用途,授权与支持由商务合同约定。"]}),"\n"]}),"\n",(0,r.jsxs)(s.blockquote,{children:["\n",(0,r.jsxs)(s.p,{children:["商业或生产迁移请使用 Engula Enterprise,版本差异与 EULA 见",(0,r.jsx)(s.a,{href:"/download",children:"下载页"}),"与 ",(0,r.jsx)(s.a,{href:"/eula",children:"EULA"}),"。"]}),"\n"]}),"\n",(0,r.jsx)(s.hr,{}),"\n",(0,r.jsxs)(s.h2,{id:"迁移后验证收益",children:["迁移后:验证收益",(0,r.jsx)(s.a,{className:"header-anchor","aria-hidden":"true",href:"#迁移后验证收益",children:"#"})]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:(0,r.jsx)(s.a,{href:"/proof-live",children:"实时验证"})})," —— 兼容性 / 性能 / RDB / 内存效率实测结果。"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["如需迁移评估或方案细化,欢迎",(0,r.jsx)(s.a,{href:"mailto:[email protected]?subject=Engula%20%E8%BF%81%E7%A7%BB%E5%92%A8%E8%AF%A2",children:"联系我们"}),"。"]})]})}function d(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{wrapper:s}=Object.assign({},(0,l.ah)(),n.components);return s?(0,r.jsx)(s,{...n,children:(0,r.jsx)(i,{...n})}):i(n)}let h=d;d.__RSPRESS_PAGE_META={},d.__RSPRESS_PAGE_META["zh%2Fdocs%2Fmigration%2Foverview.md"]={toc:[{text:"迁移思路:一次只引入一个变量",id:"迁移思路一次只引入一个变量",depth:2},{text:"推荐方式:滚动切主(副本 + Failover)",id:"推荐方式滚动切主副本--failover",depth:2},{text:"另一种思路:代理双写 + 灰度切读",id:"另一种思路代理双写--灰度切读",depth:2},{text:"迁移前检查清单",id:"迁移前检查清单",depth:2},{text:"通用风险控制原则",id:"通用风险控制原则",depth:2},{text:"上线前必须确认",id:"上线前必须确认",depth:2},{text:"迁移后:验证收益",id:"迁移后验证收益",depth:2}],title:"迁移到 Engula \xb7 总览",headingTitle:"迁移到 Engula \xb7 总览",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.