java - kafka中partition設(shè)計(jì)的優(yōu)點(diǎn)是什么?
問題描述
提高并發(fā)寫入嗎? 磁盤io同一時(shí)刻只能寫入一個(gè)文件吧?提高并發(fā)讀取嗎? 磁盤io同一時(shí)刻只能讀取一個(gè)文件吧?提高單次寫入速度嗎?貌似跟partiton沒啥關(guān)系吧?提高單次讀取速度嗎?多segment不就解決了?
問題解答
回答1:原答案:難道不是topic的擴(kuò)展能力嗎?不然單topic的容量只能限制在物理機(jī)上了更新后的答案: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 主要有兩個(gè)目的,1 增強(qiáng)擴(kuò)展能力,讓其可以處理任意多的數(shù)據(jù) 2 作為并行單元,提高并行能力(主要鑒于此點(diǎn)考慮)。第一次回答我只記住第一點(diǎn)了~~sorry
相關(guān)文章:
1. docker綁定了nginx端口 外部訪問不到2. 前端 - html5 audio不能播放3. javascript - 最近用echarts做統(tǒng)計(jì)圖時(shí)遇到兩個(gè)問題?。?/a>4. javascript - 深夜被問題困擾求解惑,rn的API之PermissionsAndroidd的問題5. mysql - 我的myeclipse一直連顯示數(shù)據(jù)庫(kù)連接失敗,不知道為什么6. redis sentinel怎么跑守護(hù)進(jìn)程以及日志記錄位置的?7. android權(quán)限被第三方安全軟件禁止,如何獲取該權(quán)限狀態(tài)8. android - 優(yōu)酷的安卓及蘋果app還在使用flash技術(shù)嗎?9. 利用百度地圖API定位及附件商家信息服務(wù)10. nginx - ssl加密訪問證書不受信任

網(wǎng)公網(wǎng)安備