知识卡片
缓冲降级要有耗尽边界
把失败请求写入持久队列能延迟处理,但积压不会自动消失。缓冲方案须定义容量、过期时间、监控告警和补偿处理;否则队列耗尽可能转化成新的拒绝服务故障。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Principles of Software Architecture Modernization》第2章《Anti-Patterns: Lack of Isolation》(源文件:`_epub-src/OPS/ch02.xhtml`,归一化正文 [71411:75552))
- 结论依据:原文指出缓冲可能耗尽并造成 DoS,要求 TTL、监控告警与人工检查等补偿机制。
- 原始内容:Buffers can encounter exhaustion issues; what happens if the queue is never cleaned up? You might create a Denial of Service (DoS) problem. Safe use of buffers requires Time To Live (TTL) and additional compensating mechanisms, such as ensuring observability (monitoring and alerting), and perhaps humans need to review the queue from time to time.