Migrating stateful microservices in Kubernetes requires careful state management because in-memory state is lost when a container restarts. For StatefulSet-managed workloads, the problem is compounded by identity constraints that prohibit two pods with the same ordinal from running simultaneously, forcing a sequential stop-recreate cycle with a median 38.5s of service downtime. This paper presents SHADOW Seamless Handoff And Zero-Downtime Orchestrated Workload Migration, a Kubernetes-native framework that implements the Message-based Stateful Microservice Migration (MS2M) approach as a Kubernetes Operator. SHADOW introduces the ShadowPod strategy, where a shadow pod is created from a CRIU checkpoint image on the target node while the source pod continues serving traffic, allowing concurrent operation during message replay. For StatefulSet workloads, an identity swap procedure with the ExchangeFence mechanism re-checkpoints the shadow pod, creates a StatefulSet-owned replacement, and drains both message queues to guarantee zero message loss during the handoff. An evaluation on a bare-metal Kubernetes cluster with 280 migration runs across four configurations and seven message rates (10--120msg/s) shows that, compared to the sequential baseline on the same StatefulSet workload, the ShadowPod strategy reduces the restore phase by up to 92%, eliminates service downtime entirely, and reduces total migration time by up to 77%, with zero message loss across all 280 runs.


翻译:在Kubernetes中迁移有状态微服务需要谨慎的状态管理,因为容器重启会导致内存状态丢失。对于由StatefulSet管理的工作负载,身份约束进一步加剧了问题——它禁止具有相同序号的Pod同时运行,迫使系统执行连续的停止-重建循环,造成中位数为38.5秒的服务停机。本文提出SHADOW(Seamless Handoff And Zero-Downtime Orchestrated Workload Migration),一个作为Kubernetes Operator实现的Kubernetes原生框架,其核心是基于消息的有状态微服务迁移(MS2M)方法。SHADOW引入ShadowPod策略:在目标节点上通过CRIU检查点镜像创建影子Pod,同时源Pod继续处理服务流量,从而在消息重放期间实现并发运行。针对StatefulSet工作负载,框架通过ExchangeFence机制执行身份交换流程:对影子Pod重新建立检查点,创建由StatefulSet管理的替代Pod,并清空两个消息队列以确保切换过程中零消息丢失。在裸金属Kubernetes集群上的评估表明,针对同一StatefulSet工作负载,在四种配置及七种消息速率(10-120msg/s)下进行的280次迁移测试中,ShadowPod策略相比顺序基线方案将恢复阶段缩短最多92%,完全消除服务停机,并将总迁移时间降低77%,且280次运行均未发生消息丢失。

0
下载
关闭预览

相关内容

《安全战术微云对边缘任务的支持》21页slides
专知会员服务
26+阅读 · 2024年6月9日
【2022新书】构建微服务:设计细粒度系统,615页pdf
专知会员服务
91+阅读 · 2022年9月4日
专知会员服务
31+阅读 · 2020年12月21日
【DeepMind】CrossTransformers: 空间感知的小样本迁移
专知会员服务
40+阅读 · 2020年7月26日
前端微服务在字节跳动的落地之路
前端之巅
41+阅读 · 2019年9月19日
基于Prometheus的K8S监控在小米的落地
DBAplus社群
16+阅读 · 2019年7月23日
React Native 分包哪家强?看这文就够了!
程序人生
13+阅读 · 2019年1月16日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
印度精确打击与指挥架构的断层
专知会员服务
0+阅读 · 今天14:41
美空军AI完成F-16战斗机自主空战历史性试飞
专知会员服务
2+阅读 · 今天14:13
深入Project Maven:为何人工智能在战场上依然失灵
锻造未来士兵:外骨骼、基因工程与赛博格
专知会员服务
7+阅读 · 7月19日
《无人机蜂群通信技术研究》50页
专知会员服务
8+阅读 · 7月19日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员