知识卡片
心跳监督需要独立时钟
监督器应将定期核对与心跳接收分成独立触发源。需预先登记预期的参与者,忙碌导致的延迟也应计入阈值设计。给每代实例不同身份,可以阻止旧实例的心跳覆盖新实例记录。应测试所有心跳同时停止的情况。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 8. The Actor Model 监督、心跳与代际切换 · 查看原书依据
Our actors now support sending heartbeats to the router for the supervisor to keep track of. Next we need to build our supervisor actor. Our supervisor actor has a similar approach to the rest of the actors. It has an infinite loop containing a timeout because the lack of heartbeat messages should not stop the supervisor actor from checking on the state of the actors
参考来源
- 位置:《Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)》第08章《Chapter 8. The Actor Model》,监督、心跳与代际切换(来源项目 book-source,extracted/Async Rust Unleashing the Power of Fearless Concurrency (Maxwell Flitton, Caroline Morton)/_epub-src/OEBPS/ch08.html#creatingActorSupervision)
- 结论依据:书中要求没有心跳时仍检查存活状态,并以超期触发路由重置。
- 原始内容:Our actors now support sending heartbeats to the router for the supervisor to keep track of. Next we need to build our supervisor actor. Our supervisor actor has a similar approach to the rest of the actors. It has an infinite loop containing a timeout because the lack of heartbeat messages should not stop the supervisor actor from checking on the state of the actors