CHAPTER DEEP READ · SRE · CHAPTER 12

Effective Troubleshooting: stop the bleeding, then solve the case

Site Reliability Engineering · Ch 12 · Chris Jones · Google · 2016

中文 →

What is this chapter about?

A site won't load, an app spins forever, a payment hangs — somebody has to go find the fault. You probably assume that job runs on talent: some people just have the touch and can glance at a log and know. Chapter 12 of Google's SRE book says otherwise: it is not talent, it is a craft, and a craft can be taught. The chapter breaks "how experts find faults" into steps anyone can follow.

An analogy first

Think of an emergency room. A patient comes in, and the doctor's first move is not to work out the diagnosis — it is to stop the bleeding. The cause can wait; the patient cannot. Only once things are stable come the blood tests and the scans (metrics and logs), then the reasoning, then trying a treatment and watching the response, then the write-up.

The most valuable line in the chapter hides in that ordering: step one is not finding the cause, it is stopping the bleeding. Spend forty minutes nailing the culprit and your users hurt for forty minutes — solving the case does not shorten their pain by a second.

Why the old world is hard

It is hard because people guess. The book names the common guesses: staring at a metric that has nothing to do with this; mistaking coincidence for cause — two lines rise together on a dashboard, so one must have caused the other (the more things you monitor, the more pairs of lines happen to look alike); and clinging to whatever caused last time's outage.

The core ideas

Stopping the bleeding and solving the case are two jobs, and they can run at once. Shift traffic to the machines that still work, switch off a non-essential feature, degrade the slow thing — none of that requires knowing the cause. One condition though: don't wipe the scene. The most common way to stop the bleeding is a restart, and a restart usually burns the only evidence, so the same failure comes back next month.

Halve it, don't walk it. A request passes seven or eight stages: gateway, frontend, auth, business logic, cache, database, storage. Probe the one in the middle: if the middle looks healthy, the fault is downstream; if the middle is already wrong, it is upstream. Each cut removes half, so seven or eight stages collapse in about three cuts. This is the line between investigating and guessing.

A broken system is usually still busy — just busy with the wrong thing. So don't ask the big question "why did it break". Ask three smaller ones: what is it doing? where is the effort going? why there? The book's example: a database cluster slows down; ask where the CPU is going and it turns out to be sorting log entries; ask where inside the sorting and it is matching a badly written pattern against filenames. Four layers separate the symptom from the culprit — unreachable by guessing, inevitable by asking, layer by layer, where the effort goes.

The cheapest question: what touched it last? Systems have momentum — a thing that was running fine does not break on its own. Reading the change log usually beats reading the code.

A true story

In July 2019 Cloudflare shipped a new firewall rule containing a badly written pattern, which pinned CPU on machines worldwide and knocked out a large slice of the web. The timeline is this chapter in miniature: trouble at 13:42, understood only at 14:02, and the moment they understood it they killed that whole rule set globally with one switch; traffic was back by 14:09. Fixing the rule itself and turning it back on came more than forty minutes later.

Remember this one line

Troubleshooting is a craft, not a gift: stop the bleeding before solving the case (without wiping the evidence), cut from the middle instead of walking from the front, ask "what is it busy with, where is the effort going" rather than staring at "why did it break", and always look first at what touched it last. One honest cost: all of this rests on being able to see inside the system — logs, metrics, request paths all have to be paid for in advance. If nobody paid, the prettiest method still leaves you guessing on the day it matters.

Want the full process diagram, comparison tables and real cases? → switch to the deep read