知识卡片
一次性工作可用文件接口
工作者若只在启动时接收一次输入,可以通过环境变量给出文件路径,由挂载文件提供数据,而无需为一次调用启动HTTP服务器。书中WORK_ITEM_FILE与ConfigMap体现这一接口;共享文件的写权限、输入验证和敏感信息存储仍需单独控制,localhost也不是绝对信任保证。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 11. Work Queue Systems · 查看原书依据
we will use a file-based API. Namely, when the worker container is created, it will receive an environment variable named WORK_ITEM_FILE; this will point to a file in the container’s local filesystem, where the data field from a work item has been written to a file.
参考来源
- 位置:《Designing Distributed Systems, 2nd Edition》第11章《Chapter 11. Work Queue Systems》(来源项目 book-sources;源文件:extracted/Designing Distributed Systems, 2nd Edition/_epub-src/OEBPS/ch11.html)
- 结论依据:原文从单次调用和脚本工作者推导文件式输入接口。
- 原始内容:we will use a file-based API. Namely, when the worker container is created, it will receive an environment variable named WORK_ITEM_FILE; this will point to a file in the container’s local filesystem, where the data field from a work item has been written to a file.