知识卡片
配置缓存隔离短暂依赖故障
数据变化不快且体积小,例如配置,可保留最近可用值,在配置注册中心暂时不可用时继续工作。它把读取来源的短暂故障与业务处理隔开。前提是旧值在这段时间仍可接受,缓存内容可验证;本章并未给出所有数据都能安全用旧值的保证,权限撤销或实时余额等语义不能直接类推。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 构建稳定系统 · 查看原书依据
Finally, if the data does not change quickly and is not very big (e.g., configuration data), sometimes it is useful to keep cache values and fall back on those values if the source is unavailable.
参考来源
- 位置:《Software Architecture and Decision-Making》第12章《Building Stable Systems》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch12.xhtml)
- 结论依据:摘录说明数据变化不快且体积小,例如配置,可保留最近可用值,在配置注册中心暂时不可用时继续工作。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。
- 原始内容:Finally, if the data does not change quickly and is not very big (e.g., configuration data), sometimes it is useful to keep cache values and fall back on those values if the source is unavailable.