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权威指南
安装
Kafka
29
2.7.2
 数据中心布局
在开发阶段,人们并不会太关心
Kafka
服务器在数据中心所处的物理位置,因为即使集群
在短时间内出现局部或完全不可用,也不会造成太大影响。但是,在生产环境,服务不可
用意味着金钱的损失,具体表现为无法为用户提供服务或者不知道用户正在做什么。这个
时候,使用
Kafka
集群的复制功能就变得尤为重要(请参考第
6
章),而服务器在数据中
心所处的物理位置也变得重要起来。如果在部署
Kafka
之前没有考虑好这个问题,那么在
后续的维护过程中,移动服务器需要耗费更高的成本。
在为
broker
增加新的分区时,
broker
并无法获知机架的信息。也就是说,两个
broker
可能是在同一个机架上,或者在同一个可用区域里(如果运行在像
AWS
这样的的云服务
上),所以,在为分区添加副本的时候,这些副本很可能被分配给同一个机架上的
broker
它们使用相同的电源和网络连接。如果该机架出了问题,这些分区就会离线,客户端就无
法访问到它们。更糟糕的是,如果发生不完整的主节点选举,那么在恢复时就有可能丢失
数据(第
6
章将介绍更多细节)。
所以,最好把集群的
broker
安装在不同的机架上,至少不要让它们共享可能出现单点故障
的基础设施,比如电源和网络。也就是说,部署服务器需要至少两个电源连接(两个不同
的回路)和两个网络交换器(保证可以进行无缝的故障切换)。除了这些以外,最好还要
broker
安放在不同的机架上。因为随着时间的推移,机架也需要进行维护,而这会导致
机器离线(比如移动机器或者重新连接电源) ...
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