文章詳情頁
java - kafka中partition設計的優點是什么?
瀏覽:78日期: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. WEB-INF / classes /與WEB-INF / lib / *。jar在類路徑優先級?2. javascript - js 寫一個正則 提取文本中的數據3. yii2中restful配置好后在nginx下報404錯誤4. javascript - 關于Lazyload遇到的問題5. 算法 - python 給定一個正整數a和一個包含任意個正整數的 列表 b,求所有<=a 的加法組合6. android 如何實現如圖中的鍵盤上的公式及edittext的內容展示呢7. ruby - gitlab托管,git clone 失敗?8. c++ - 如何正確的使用QWebEngineView?9. angular.js - react的redux和vue的vuex,angular呢10. java - 我在用Struts2上傳文件時,報以下錯誤怎么回事?
排行榜
