推荐指数 54.2
← 返回 2026.11.30 日报
日报快照 · Daily Snapshot
NO. 017

故障切换不演练等于没做

#ARTICLE HackerNews 2026.11.30
推荐指数 56.0 NO. 017 · 2026.11.30
发布2026/11/29Score261Comments67

备份只有最后一次恢复时才算数,故障切换同理。长期闲置的温备环境表面健康,实际连接池、证书、配置漂移等问题会在真正灾备时集中爆发。

很多团队把 failover 做成"年检项目",一年演练一次,结果每次都能发现新问题。Netflix 的 Chaos Monkey 思路在这里更实用:把故障注入变成常态,让 standby 定期承接真实流量。

一个具体做法是把只读查询按比例切到温备,既验证了链路,又省了资源空转。Google Spanner 的自动故障切换能做到秒级,前提是它每天都在做内部演练——这不是技术差距,是工程纪律差距。

如果你现在还在用"主备切换演练"这种项目制做法,建议改成每周自动化的影子流量测试,成本增加不到 10%,可靠性提升一个数量级。

意见分歧 83 条评论

核心争论:故障演练必要性与管理/成本阻力之间的现实冲突

stackskipton

Companies rarely test this because they have no desire to test this. There is no management push to get it done and massive downside in testing causes outages which impacts engineering teams. Coupled with most companies rarely need uptime they claim they need. Most companies I've worked at, downtime

mlhpdx

Perhaps oddly, almost every company I’ve worked at suffered real financial pain as a result of outages. Lost production at one that did quick-turn manufacture to order, and two more with customers that (rightly) demanded steep SLA penalties. None of them got to a point where failover was comfortable

trollbridge

A thousand times, yes. I now do rolling reboots in my clusters, partly because I needed to get a lot better about keeping them patched. Once you trust your HA, you just take the server or service offline, do what you need to do, and then turn it back on. And you have a backup plan of “it’s trivial t

替代方案: RAID-1C3CephFS软RAID热备冷备
查看原文 →