kafka中partition设计的优点是什么?

提高并发写入吗? 磁盘io同一时刻只能写入一个文件吧?
提高并发读取吗? 磁盘io同一时刻只能读取一个文件吧?
提高单次写入速度吗?貌似跟partiton没啥关系吧?
提高单次读取速度吗?多segment不就解决了?

阅读 3.6k
1 个回答

原答案:难道不是topic的扩展能力吗?不然单topic的容量只能限制在物理机上了
更新后的答案:
The partitions in the log serve several purposes. First, they allow the log to scale beyond a size that will fit on a single server. Each individual partition must fit on the servers that host it, but a topic may have many partitions so it can handle an arbitrary amount of data. Second they act as the unit of parallelism—more on that in a bit.
官方文档(见上文)。
partitions 主要有两个目的,1 增强扩展能力,让其可以处理任意多的数据 2 作为并行单元,提高并行能力(主要鉴于此点考虑)。
第一次回答我只记住第一点了~~sorry

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题