Skip to Content
Kafka权威指南
book

Kafka权威指南

by Neha Narkhede, Gwen Shapira, Todd Palino
January 2018
Beginner to intermediate
234 pages
7h 8m
Chinese
Posts & Telecom Press
Content preview from Kafka权威指南
24
2
2.4.4
 网络
网络吞吐量决定了
Kafka
能够处理的最大数据流量。它和磁盘存储是制约
Kafka
扩展规模
的主要因素。
Kafka
支持多个消费者,造成流入和流出的网络流量不平衡,从而让情况变
得更加复杂。对于给定的主题,一个生产者可能每秒钟写入
1MB
数据,但可能同时有多
个消费者瓜分网络流量。其他的操作,如集群复制(在第
6
章介绍)和镜像(在第
8
章介
绍)也会占用网络流量。如果网络接口出现饱和,那么集群的复制出现延时就在所难免,
从而让集群不堪一击。
2.4.5
 
CPU
与磁盘和内存相比,
Kafka
对计算处理能力的要求相对较低,不过它在一定程度上还是
会影响整体的性能。客户端为了优化网络和磁盘空间,会对消息进行压缩。服务器需要
对消息进行批量解压,设置偏移量,然后重新进行批量压缩,再保存到磁盘上。这就是
Kafka
对计算处理能力有所要求的地方。不过不管怎样,这都不应该成为选择硬件的主
要考虑因素。
2.5
 云端的
Kafka
Kafka
一般被安装在云端,比如亚马逊网络服务(
Amazon Web Services
AWS
)。
AWS
供了很多不同配置的实例,我们要根据
Kafka
的性能优先级来选择合适的实例。可以先从
要保留数据的大小开始考虑,然后考虑生产者方面的性能。如果要求低延迟,那么就需要
专门为
I/O
优化过的使用固态硬盘的实例,否则,使用配备了临时存储的实例就可以了。
选好存储类型之后,再选择
CPU
和内存就容易得多。
实际上,如果使用
AWS
,一般会选择
m4
实例或
r3
实例。
m4
实例允许较长时间地保留数 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精通機器學習

精通機器學習

Aurélien Géron
精通特征工程

精通特征工程

Alice Zheng, Amanda Casari
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald

Publisher Resources

ISBN: 9787115473271