Skip to Content
Google系统架构解密: 构建安全可靠的系统
book

Google系统架构解密: 构建安全可靠的系统

by Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield
September 2021
Beginner to intermediate
392 pages
12h 13m
Chinese
Posts & Telecom Press
Content preview from Google系统架构解密: 构建安全可靠的系统
236
15
15.1
 从调试到调查
我强烈地意识到,我余生的大部分时间将花在寻找自己程序中的错误上。
——
Maurice
Wilkes
Memoirs of a Computer Pioneer
1985
调试不受欢迎。缺陷出现时,往往祸不单行。很难评估缺陷的修复时间点,或者系统何时
修复到让人能用的程度。对大多数人来说,编写新代码比调试现有程序更具吸引力。人们
往往会认为调试是没有回报的。然而,调试是有必要的。从学习新知识和工具的角度来
看,调试甚至是令人愉快的。从经验来看,调试能提升我们的专业水平,并能提醒我们:
有时我们并没有自己想象的那样聪明。
15.1.1
 案例
临时文件
如下文所述,两年前,我们调试了一次服务停机事件
1
。当时,收到警告提示
Spanner
数据
库的存储配额不足后,我们随机展开了调查。调试过程中,我们提出并探索了以下问题。
1.
导致数据库容量耗尽的原因是什么?
根据快速复现的结果显示,产生问题的原因是,由于用户请求流量变化,大量小文件在
Google
海量分布式文件系统
Colossus
内创建并累积。
2.
小文件的创建来源是什么?
通过查看服务指标发现,
Spanner
服务器内存不足
,创建了大量小文件。服务的正常行
为应是将最近的写入(更新)缓存到内存中。当内存不足时,将数据以文件形式上传至
Colossus
系统中
。不幸的是,
Spanner
区域中的每台服务器只有少量内存能容纳更新,
于是导致每台服务器都将许多小文件上传至
Colossus
,而不是数量可控
、压缩过的更大
的文件
2
3. ...
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

管理Kubernetes

Brendan Burns, Craig Tracey
Python机器学习基础教程

Python机器学习基础教程

Andreas C. Müller, Sarah Guido
解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787115569257