知识卡片
无状态是实例替换的约束
无状态服务不是完全没有数据,而是不把继续处理请求必需的持久上下文只留在某个实例。外置会话可使任意副本接手,但外部存储仍要承担一致性和恢复责任;数据搬到外部并不改变它可能与特定用户相关的业务语义。亲和路由可临时补救,不能防止该实例丢失带来的影响。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Scalability · 查看原书依据
“Local” is an operative word here. Saying that an application is “stateless” doesn’t mean that it doesn’t have any data, rather that it’s been designed in such a way that any data that it needs doesn’t live locally. Data that’s the same for every client and which has nothing to do with the actions of
参考来源
- 位置:《Cloud Native Go》第07章《Scalability》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch07.xhtml)
- 结论依据:无状态服务不是完全没有数据,而是不把继续处理请求必需的持久上下文只留在某个实例。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。
- 原始内容:“Local” is an operative word here. Saying that an application is “stateless” doesn’t mean that it doesn’t have any data, rather that it’s been designed in such a way that any data that it needs doesn’t live locally. Data that’s the same for every client and which has nothing to do with the actions of