Skip to Content
寻求 SRE
book

寻求 SRE

by David N. Blank-Edelman
July 2025
Intermediate to advanced
590 pages
6h 21m
Chinese
O'Reilly Media, Inc.
Content preview from 寻求 SRE

第 11 章 深受各地DevOps人员喜爱的 SRE 模式

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

本文节选自 Gene Kim、Jez Humble、John Willis 和 Patrick Debois 所著的《DevOps 手册》(O'Reilly,2016 年)。

当戴维-布兰克-埃德尔曼(David Blank-Edelman)请我撰写一章介绍 SRE 知识体系及其对 DevOps 社区的影响时,我非常热情地答应了:"好!"

虽然有些人可能会认为 SRE 和 DevOps 是相互排斥的,但我的观点恰恰相反。在我看来,SRE 在确定运维社区如何为组织目标做出最佳贡献以及提高开发人员的工作效率方面所产生的影响,无论怎样强调都不为过。正如谷歌 SRE 副总裁 Ben Treynor Sloss 在 2014 年 SREcon 演讲中所说的名言:"我将 SRE 定义为软件工程师创建运营小组时发生的事情"。

在那次著名的演讲中,Treynor Sloss 提出了一个令人叹为观止的概念,即一个真正的自我平衡系统,在这个系统中,组织首先决定可接受的错误预算,然后指导非功能性需求的优先级排序,并对部署和发布的决策进行把关。

在研究和撰写《DevOps 手册》的过程中(与我的合著者 Jez Humble、John Willis 和 Patrick Debois 合著),我不禁注意到,我们喜爱的、现在可以视为理所当然的 DevOps 模式,有很多都是谷歌首创的。

以下是从《DevOps 手册》中摘录的三种我最喜欢的模式,它们可以追溯到 SRE 知识体系。几乎任何组织都可以将它们融入日常工作中。

模式 1:自动测试在谷歌的诞生

自动测试解决了一个真正重大且令人不安的问题。加里-格鲁弗(Gary Gruver)指出:"如果没有自动化测试,我们编写的代码越多,测试代码所需的时间和金钱就越多--在大多数情况下,这对任何技术组织来说都是一种完全无法扩展的商业模式。

尽管谷歌现在无疑是重视大规模自动化测试的文化典范,但情况并非总是如此。2005 年,迈克-布兰德(Mike Bland)加入谷歌时,在Google.com上进行部署经常会遇到很多问题,尤其是对于谷歌网络服务器(GWS)团队而言。正如布兰德所解释的那样:

GWS 团队在 2000 年代中期陷入了这样一种境地:要对网络服务器进行更改极其困难,而网络服务器是一个 C++ 应用程序,负责处理对 Google 主页和许多其他 Google 网页的所有请求。尽管Google.com非常重要和突出,但在 GWS 团队工作并不是一项光彩的任务--它往往是创建各种搜索功能的不同团队的垃圾场,而所有这些团队都在独立开发代码。他们遇到的问题包括:构建和测试耗时过长,代码未经测试就投入生产,以及团队不经常检查与其他团队相冲突的大量变更。

这样做的后果很严重--搜索结果可能会出现错误或变得异常缓慢,从而影响到google.com 上成千上万的搜索查询。潜在的结果不仅是收入的损失,而且是客户信任度的损失。

布兰德描述了这对开发人员部署变更的影响:"恐惧成了思想杀手。恐惧阻止了新团队成员改变事情,因为他们不了解系统。但恐惧也阻止了有经验的人改变现状,因为他们太了解系统了。1布兰德是决心解决这一问题的小组成员之一。

GWS 团队负责人 Bharat Mediratta 相信自动化测试会有所帮助。正如布兰德所描述的那样 ...

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

设计数据密集型应用程序

设计数据密集型应用程序

Martin Kleppmann
云数据湖

云数据湖

Rukmani Gopalan
软件工程基础

软件工程基础

Nathaniel Schutta, Dan Vega

Publisher Resources

ISBN: 9798341663169