Skip to Content
平台即产品
book

平台即产品

by Abby Bangser, Daniel Bryant, Colin Humphreys, Cat Morris
October 2025
Beginner to intermediate
46 pages
21m
Chinese
O'Reilly Media, Inc.
Content preview from 平台即产品

第 4 章. 舰队思维:大规模管理平台

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

大多数平台工程都是从单一用例开始的。开发人员需要一个数据库,或者一个团队想要部署一个应用程序。平台团队会构建一个工作流或模板来支持该需求。起初,这样做效果很好。一个模板。一个路径。一个环境。但当企业发展壮大时会发生什么?当您拥有数百项服务、数十个团队、多个环境和不断变化的合规要求时,会发生什么?

这时,机群思维就变得至关重要。

正如汽车和航空航天公司管理具有不同版本、维护状态和运行条件的车辆或飞机机队一样,平台团队必须学会管理整个组织的服务、环境和基础设施机队。这种思维方式的转变对于可持续、可扩展性的内部平台至关重要。

机群管理 101

机群管理是指管理一系列相似但不完全相同的事物,每个事物都有自己的生命周期、依赖关系和限制条件。

在平台工程中,你的 "舰队 "包括

  • 跨越多种环境的应用

  • 平台提供的数据库、缓存和队列

  • 跨团队使用的 CI/CD 管道和工作流

  • 集群、虚拟私有云(VPC)或云账户等基础设施组件

  • 随时间发展的平台功能和插件

每个元素都有自己的生命周期。它们需要创建、监控、升级,有时甚至需要退役。如果没有用于机群管理的工具和流程,就会出现漂移。团队会运行同一服务的不同版本。合规性检查不同步。支持变得被动和不可预测。

然而,一切并没有失去意义;我们可以从这个在日常通勤中与我们的生活息息相关的行业中吸取经验教训。

汽车平台的经验教训

现代汽车会接收无线 (OTA) 软件更新,以修复漏洞、修补安全问题并推出新功能。但这些更新并不只是为了速度。它们在设计时考虑到了安全性和协调性。更新可以分阶段进行、暂停、回滚或选择性应用。汽车系统知道自己正在运行的是什么版本,有哪些依赖关系,以及在应用变更之前是否健康。

这种方法直接适用于平台工程。您的内部平台应该能够做到以下几点:

  • 版本功能并跟踪运行情况。

  • 逐步推出更新,控制时间和范围。

  • 针对问题暂停或回滚变更。

  • 跟踪所有配置的所有权和生命周期。

  • 支持整个机群的策略执行和漂移检测。

舰队思维将平台从 "构建一次就有希望 "的系统转变为持续管理的环境。

为什么版本管理很重要

在非管理系统中,服务模板或平台功能的新版本通常是以 "静默 "更新的方式部署的。没有明确的沟通,没有回滚路径,也无法确定每个团队正在运行的版本。

这就导致了一种常见的反模式:隐形分歧。一个团队使用的是 v1.2。另一个团队使用的是 v1.4。第三个团队修改了自己的拷贝,正在运行一个分叉版本。平台团队失去了可见性和控制,故障排除变成了猜谜游戏。

如图 4-1 所示,将版本管理与机群管理相结合,每个平台功能都被视为已申报的可升级资产。团队可以按照自己的节奏采用新版本。平台可以跟踪使用情况,执行淘汰计划,并安全地协调升级。机群管理可实现大规模安全变更。

Diagram showing different version histories across teams without fleet management, highlighting skipped versions, duplicated effort, and forked codebases.
图 4-1. 在没有机群管理的情况下运营服务所面临的挑战

可组合、可升级的服务

机群思维还推动平台团队设计可组合、可升级的功能,而不是定制或一次性的功能。这意味着要构建服务、模板和工作流程:

  • 可进行版本控制和升级,而不会破坏用户体验

  • 支持配置而无需分叉

  • 尽可能提供向后兼容性

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

The Hidden Cost of AI-Assisted Creativity

The Hidden Cost of AI-Assisted Creativity

Léonard Boussioux, Anil Doshi, Oliver Hauser, Kartik Hosanagar
How to Develop a Great Digital Strategy

How to Develop a Great Digital Strategy

Jeanne W. Ross, Cynthia M. Beath, Ina M. Sebastian
Are You an Authentic Leader or an Authentic Jerk?

Are You an Authentic Leader or an Authentic Jerk?

Hannes Leroy, Michael A. Daniels, Kristin L. Cullen-Lester, Alexandra Gerbasi

Publisher Resources

ISBN: 0642572267162