Files
nexus/wiki/concepts/Kill-Switch.md

1.3 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
Kill Switch concept
DevOps
FeatureFlag
可靠性工程
2026-04-16

定义

Kill Switch紧急开关Feature Flag 的紧急应用场景,可在生产环境出现故障时一键关闭问题功能,无需重新部署代码。

核心价值

  • RTO 保险策略:问题发生时 Flip the Flag 而非 Debug under pressure
  • 数据完整性保护:在 bug 持续破坏数据时立即止损,比等待完整回滚部署更快

典型应用场景

  • 支付网关故障:立即切换到备用支付提供商
  • 搜索算法异常:回退到旧的搜索算法
  • AI 模型产生幻觉:切换回上一稳定版本
  • 数据库迁移导致性能下降:仅回滚该变更而非整个部署

与 Feature Flag 的关系

  • Kill Switch 是 Feature Flag 的一种高级应用
  • Feature Flag 提供 Kill Switch 的工程基础(部署与发布解耦)

与 RTO 的关系

  • Kill Switch 将 RTO 从"部署回滚时间"降至"配置变更时间"(秒级)
  • HP 案例:从小时级降至分钟级
  • Christian Dior 案例:从 15 分钟降至即时开关

Connections

  • Feature Flag ← Kill Switch 的工程基础
  • RTO ← 通过 Kill Switch 实现秒级 RTO
  • LaunchDarkly ← 企业级 Kill Switch 平台