← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 5383.a

批量落盘后再确认消息

理解等级:中级

磁盘持久服务可以先把写请求排入队列,由单个批量写者合并写入,真正完成磁盘写入后再向相应客户端确认。客户端收到确认才有已持久化的依据,而不是收到内存入队通知。批量减少I/O次数,却也引入等待;崩溃恢复仍依赖日志和处理语义。本章十倍至百倍是书中经验示例,不应当作当前实现的吞吐承诺。

这里把[[单写者减少读写协调]]应用到持久确认,增加写盘完成后才可承诺的边界。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 服务端架构 · 查看原书依据

      In the figure, a single thread (running batch writer) reads as many write requests as possible from the write queue (shown as the Ack queue in the figure) and writes them, batching multiple requests in a single write.

    参考来源

    - 位置:《Software Architecture and Decision-Making》第11章《Server Architectures》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch11.xhtml) - 结论依据:摘录说明磁盘持久服务可以先把写请求排入队列,由单个批量写者合并写入,真正完成磁盘写入后再向相应客户端确认。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。 - 原始内容:In the figure, a single thread (running batch writer) reads as many write requests as possible from the write queue (shown as the Ack queue in the figure) and writes them, batching multiple requests in a single write.