知识卡片
幂等是持续收敛的基础
幂等指重复执行同一声明仍得到同一目标结果。仅检查服务器是否存在,可避免重复创建,却不能保证内存等属性符合声明;完整实现还要检测和修正属性。把这些分支不断加进脚本会变复杂,因此工具承担状态比较与收敛,操作者不再凭记忆选择迁移脚本。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 基础设施工具与语言 · 查看原书依据
The script is now idempotent. No matter how many times we run it, the result is the same; a single server named my-server. If we configure an automated process to run this script continually, we can be sure the server exists. If the server doesn’t already exist, the process will create it. If someone destroys
参考来源
- 位置:《Infrastructure As Code》第4章《基础设施工具与语言》(来源项目 book-sources,源文件:extracted/Infrastructure As Code/_epub-src/OEBPS/ch04.html)
- 结论依据:原文对该概念的定义、应用条件与作用机制直接支持上述解释。
- 原始内容:The script is now idempotent. No matter how many times we run it, the result is the same; a single server named my-server. If we configure an automated process to run this script continually, we can be sure the server exists. If the server doesn’t already exist, the process will create it. If someone destroys