Skip to Content
在 Kubernetes 上管理云原生数据
book

在 Kubernetes 上管理云原生数据

by Jeff Carpenter, Patrick McFadin
May 2025
Beginner to intermediate
332 pages
4h 22m
Chinese
O'Reilly Media, Inc.
Content preview from 在 Kubernetes 上管理云原生数据

第 9 章 Kubernetes 上的数据分析 Kubernetes 上的数据分析

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

当我们有能力变得更懒惰时,就是技术进步的时候。

劳里安-奇里卡博士

本世纪初,谷歌公司宣布了一个公开的目标:"组织世界上的信息,并使其普遍可用和有用",从而吸引了整个互联网。这是一个雄心勃勃的目标,而要实现这一目标,用一句俗话来形容,那就是需要 "计算机科学"。鉴于数据创建的速度越来越快,谷歌需要发明(和重新发明)前所未有的数据量管理方法。围绕着数据分析,一个全新的社区、文化和行业诞生了,它被称为分析,解决的是最终被称为 "大数据 "的问题。如今,分析已成为几乎所有应用堆栈的正式成员,而不仅仅是谷歌的问题。现在,它是每个人的问题;不再是局限于少数专家的艺术形式,我们每个人都需要知道如何让分析发挥作用。企业需要可靠、快速的方法来部署带有分析功能的应用程序,这样才能事半功倍。

奇里卡博士在本章开头的引文中以调侃的方式谈到的 "懒惰 "描述了一个理想的未来。与其让一个上百人的团队日以继夜地分析 PB 级的数据,如果能把时间缩短到一个人和几分钟呢?云原生的数据基础架构运行方式是我们所有人都应该为实现这种光荣的懒惰而努力的道路。

我们已经了解了将有状态工作负载迁移到 Kubernetes 的几个方面,包括存储、数据库和流。在本章中,我们将对分析进行全面介绍。作为预览,图 9-1展示了数据分析如何成为我们使用 Kubernetes 管理完整数据堆栈路线图的最后一部分。

The cloud native virtual datacenter
图 9-1. 云本地虚拟数据中心

在这种架构中,不再需要外部网络与 Kubernetes 集群内外的资源桥接,只需一个单一的虚拟数据中心,就能满足我们对云原生应用的定制需求。这些大块代表了我们在第 1 章中讨论的数据基础设施的宏观组件,此外还有部署在微服务中的用户应用程序代码。

分析入门

分析工作负载和相应的基础架构操作与其他工作负载有很大不同。分析不仅仅是另一个需要协调的容器化系统。我们在前几章中研究过的典型有状态应用(如数据库)具有许多类似的特性,但一旦部署,往往会保持静态或可预测的缓慢增长。

然而,分析工作负载的一个方面让许多管理员感到恐惧:容量。数据库等持久性数据存储可消耗千兆字节到万兆字节的存储空间,而分析工作负载却可以轻松飙升到 PB 级,这就产生了一类全新的问题需要解决。他们称之为 "大数据 "不是没有道理的。

牛津英语词典》将分析定义为 "数据或统计的系统计算分析"。维基百科补充说:"它用于发现、解释和交流数据中的有意义模式"。将这些定义与海量数据相结合,我们应该期待云原生应用取得什么样的成果呢?让我们来分析一下不同类型的分析工作流程和方法:

批量分析
在计算机科学中,批处理是一系列应用于数据的指令,几乎不需要用户交互。运行批处理作业的想法与通用计算一样古老。在 Apache Hadoop 或 Apache Spark 等分布式系统中,每个单独的作业都由一个程序组成,该程序可以分阶段或流水线方式并行操作更小的数据位。在作业结束时,这些较小的结果会合并成一个最终结果。本章稍后讨论的 MapReduce 就是一个例子。在大多数情况下,会进行统计分析,如计数、平均值和百分位数测量。批量分析是本章的重点。 ...
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

《使用 Kubernetes 实现云原生 DevOps(第二版)》

《使用 Kubernetes 实现云原生 DevOps(第二版)》

Justin Domingus, John Arundel
生产 Kubernetes

生产 Kubernetes

Josh Rosso, Rich Lander, Alex Brand, John Harris
Building a Red Hat OpenShift Environment on IBM Z

Building a Red Hat OpenShift Environment on IBM Z

Lydia Parziale, Alexandre de Oliveira, Anna Shugol, Elton de Souza, Wilhelm Mild, Rakesh Krishnakumar, Manoy Srinivasan

Publisher Resources

ISBN: 9798341659667