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权威指南
120
8
高成本
不管你是在本地还是在云端运行
Kafka
,集群之间的通信都需要更高的成本。部分原因
是因为带宽有限,而增加带宽是很昂贵的,当然,这个与供应商制定的在数据中心、区
域和云端之间传输数据的收费策略也有关系。
Kafka
服务器和客户端是按照单个数据中心进行设计、开发、测试和调优的。我们假设服
务器和客户端之间具有很低的延迟和很高的带宽,在使用默认的超时时间和缓冲区大小时
也是基于这个前提。因此,我们不建议跨多个数据中心安装
Kafka
服务器(不过稍后会介
绍一些例外情况)。
大多数情况下,我们要避免向远程的数据中心生成数据,但如果这么做了,那么就要忍受
高延迟,并且需要通过增加重试次数(
LinkedIn
曾经为跨集群镜像设置了
32 000
多次重试
次数)和增大缓冲区来解决潜在的网络分区问题(生产者和服务器之间临时断开连接)。
如果有了跨集群复制的需求,同时又禁用了从
broker
broker
之间的通信以及从生产者到
broker
之间的通信,那么我们必须允许从
broker
到消费者之间的通信。事实上,这是最安
全的跨集群通信方式。在发生网络分区时,消费者无法从
Kafka
读取数据,数据会驻留在
Kafka
里,直到通信恢复正常。因此,网络分区不会造成任何数据丢失。不过,因为带宽
有限,如果一个数据中心的多个应用程序需要从另一个数据中心的
Kafka
服务器上读取数
据,我们倾向于为每一个数据中心安装一个
Kafka
集群,并在这些集群间复制数据,而不
是让不同的应用程序通过广域网访问数据。
在讨论更多有关跨数据中心通信的调优策略之前,我们需要先知道以下一些架构原则。 ...
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