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

34 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Kill Switch"
type: concept
tags: [DevOps, FeatureFlag, 可靠性工程]
last_updated: 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 平台