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权威指南
2
1
1.1.1
 如何开始
发布与订阅消息系统的大部分应用场景都是从一个简单的消息队列或一个进程间通道开始
的。例如,你的应用程序需要往别处发送监控信息,可以直接在你的应用程序和另一个可
以在仪表盘上显示度量指标的应用程序之间建立连接,然后通过这个连接推送度量指标,
如图
1-1
所示。
前端
服务器
前端
服务器
应用程序
度量指标
应用程序
度量指标
度量指标
服务器
1-1:单个直连的度量指标发布者
这是刚接触监控系统时简单问题的应对方案。过了不久,你需要分析更长时间片段的度量
指标,而此时的仪表盘程序满足不了需求,于是,你启动了一个新的服务来接收度量指
标。该服务把度量指标保存起来,然后进行分析。与此同时,你修改了原来的应用程序,
把度量指标同时发送到两个仪表盘系统上。现在,你又多了
3
个可以生成度量指标的应用
程序,它们都与这两个服务直接相连。而你的同事认为最好可以对这些服务进行轮询以便
获得告警功能,于是你为每一个应用程序增加了一个服务器,用于提供度量指标。再过一
阵子,有更多的应用程序出于各自的目的,都从这些服务器获取度量指标。这时的架构看
起来就像图
1-2
所示的那样,节点间的连接一团糟。
前端
服务器
前端
服务器
数据库
服务器
数据库
副本
聊天
服务器
购物车
后端
服务器
度量
用户界面
指标分析
活动监控
数据库
监控器
1-2:多个直连的度量指标发布者
这时,技术债务开始凸显出来,于是你决定偿还掉一些。你创建了一个独立的应用程序,
用于接收来自其他应用程序的度量指标,并为其他系统提供了一个查询服务器。这样,之
前架构的复杂度被降低到图 ...
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