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权威指南
130
8
whitelist
这是一个正则表达式,代表了需要进行镜像的主题名字。所有与表达式匹配的主题都
将被镜像。在这个例子里,我们希望镜像所有的主题,不过在实际当中最好使用类似
prod.*
”这样的表达式,避免镜像测试用的主题。在双活架构中,
MirrorMaker
NYC
数据中心的数据镜像到
SF
,为其配置了 whilelist=
"
NYC.\*
"
,这样就不会将
SF
的主题
重新镜像回来。
8.3.2
 在生产环境部署
MirrorMaker
在上面的例子里,我们是从命令行启动
MirrorMaker
的。在生产环境,
MirrorMaker
一般是
作为后台服务运行的,而且是以 nohup 的方式运行,并将控制台的输出重定向到一个日志
文件里。这个工具有一个 -deamon 命令行参数。理论上,只要使用这个参数就能实现后台
运行,不需要再做其他任何事情,但在实际当中,最近发布的一些版本并不能如我们所期
望的那样。
大部分使用
MirrorMaker
的公司都有自己的启动脚本,他们一般会使用部署系统(比如
Ansible
Puppet
Chef
Salt
)实现自动化的部署和配置管理。
Docker
容器里运行
MirrorMaker
变得越来越流行。
MirrorMaker
是完全无状态
的,也不需要磁盘存储(所有的数据和状态都保存在
Kafka
上)。将
MirrorMaker
装在
Docker
里,就可以实现在单台主机上运行多个
MirrorMaker
实例。因为单个
MirrorMaker
实例的吞吐量受限于单个生产者,所以为了提升吞吐量 ...
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