文章详情页
java - kafka中partition设计的优点是什么?
浏览:173日期:2023-10-28 17:09:08
问题描述
提高并发写入吗? 磁盘io同一时刻只能写入一个文件吧?提高并发读取吗? 磁盘io同一时刻只能读取一个文件吧?提高单次写入速度吗?貌似跟partiton没啥关系吧?提高单次读取速度吗?多segment不就解决了?
问题解答
回答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 inpidual 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
标签:
java
相关文章:
1. mysql - SQL添加记录的数据来源于同一个表2. 如何解决tp6在zend中无代码提示3. python - 用ffmpeg采集视频,用terminate没法结束进程4. mysql多表查询5. php - 两个表数据怎么插到一个模板中,并按时间排序?6. android-studio - android app微信登录一定要申请了登录权限才能测试?7. 取不出SQL得到的当前页8. python3.x - python多进程,不能在同一窗口吗9. python - 怎样在linux下开发flask web应用时查看代码出错(traceback)的地方。10. mysql - laravel 子查询的问题
排行榜

网公网安备