知识卡片

普通读书笔记卡 · 4545.g.3.d.1.a

超时预算覆盖整个调用链

理解等级:中级

让HTTP请求上下文派生服务和数据库调用的上下文,可把调用者离开或期限到达传递给下游。共用一个上下文意味着多个阶段分享同一截止时刻,不是每到下一层重新获得完整预算。观察信号和释放资源仍依赖实际函数及驱动配合,Context本身不会替任意阻塞代码完成清理。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Resilience · 查看原书依据

      re-using the same Context value will constrain both operations under the same timeout calculation — a Context will time out regardless of how it’s used — so be sure to take that into consideration when planning your timeout values. Idempotence As we discussed at the top of Chapter 4, cloud native applications by definition exist

    参考来源

    - 位置:《Cloud Native Go》第09章《Resilience》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch09.xhtml) - 结论依据:让HTTP请求上下文派生服务和数据库调用的上下文,可把调用者离开或期限到达传递给下游。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。 - 原始内容:re-using the same Context value will constrain both operations under the same timeout calculation — a Context will time out regardless of how it’s used — so be sure to take that into consideration when planning your timeout values. Idempotence As we discussed at the top of Chapter 4, cloud native applications by definition exist