← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 3252

功能开关需降级与清理

理解等级:高级

功能开关让代码先部署,再按用户或全局范围开启,也能在迁移异常时关闭。但开关服务故障可能影响主链路,应有缓存的最近值或默认值;每个开关还需唯一命名和清理期限,迁移完成后移除旧分支。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      Like other services that cross-cut the application, a failure in the feature-flagging service would be catastrophic if not managed correctly and be a potential single point of failure. Degrading gracefully using the last known value in a cache or providing default values can help mitigate this effect.

    参考来源

    - 位置:《Mastering API Architecture》第5章《Deploying and Releasing APIs》之《Case Study: Feature Flagging》(源文件:_epub-src/OEBPS/ch05.xhtml) - 结论依据:原文说明开关的分批放量和回退用途,明确服务故障单点、最近值或默认值降级,以及完成后清理开关代码。 - 原始内容:Like other services that cross-cut the application, a failure in the feature-flagging service would be catastrophic if not managed correctly and be a potential single point of failure. Degrading gracefully using the last known value in a cache or providing default values can help mitigate this effect.