知识卡片
影子流量比较结果但不回传
迁移数据库或服务实现时,可将真实请求复制到新实现,比较响应与数据一致性,但只把旧稳定路径结果返回用户。差异要产生告警;双写停机与成本须纳入方案。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Principles of Software Architecture Modernization》第7章《Proper Service Testing》(源文件:`_epub-src/OPS/ch07.xhtml`,归一化正文 [50364:54517))
- 结论依据:原文描述镜像流量、比较并丢弃新路径结果以及双数据库场景的回退和代价。
- 原始内容:We are copying/mirroring all live traffic, so real customers only experience interactions with the live cluster; and responses from the dark cluster are inspected for errors and discarded, never returning back to live customers. Figure 7.14: Testing in Production: Live Auditing By comparing and discarding results, you can catch errors, check that database integrity is intact and records created as expected, all while leaving customers safely insulated from errors in your dark environment.