CHAPTER DEEP READ · SRE · CH 6

Monitoring Distributed Systems: if the response is mechanical, it should never wake a human

Site Reliability Engineering · Ch 6 · Google (Rob Ewaschuk) · 2016

中文 →

What is this chapter about?

Your payment fails at 2 a.m. and by morning it works again — somewhere in between, a person almost certainly got woken up by a phone. This chapter is about when that phone should ring: which numbers a live service ought to watch, what counts as "broken," and what is worth pulling a human out of bed for.

An analogy first

Think of the smoke detectors in your house. How many do you want? One goes off when the kitchen is actually on fire, and you believe it. Install twenty of them, tuned to be maximally sensitive, and they scream every time you fry an onion or take a hot shower — and within a month you will have pulled every battery out. On the day there is a real fire, nobody is listening. That is the outcome this chapter spends every page trying to prevent: an alarm nobody trusts is worse than no alarm at all.

The strange part

Most people assume the goal here is "make it smarter" — ideally a system that works out on its own what broke and why, so humans just wait for the verdict. Google says they tried that and deliberately walked away. The reason is mundane: the cleverer the system, the more tangled its insides, and when something really breaks you first have to spend half an hour working out why it is saying what it's saying — and you only had five minutes. What they picked instead sounds almost unambitious: dumb and fast.

The core idea: watch four things

A service can emit thousands of numbers, but only four are worth watching all the time — the same four that tell you how a restaurant is doing: how long the food takes, how many people walked in, how many plates went out wrong, and how much room the kitchen has left. The first three tell you how things are right now. The fourth is the only one that warns you in advance — a kitchen about to seize up still gives you time to add hands; once the food genuinely stops coming out, you're already late.

And here is the trap almost everyone falls into: when you time how long the food takes, count the wrong orders separately. Because a collapsed kitchen refuses orders very quickly — "sorry, can't do it" takes two seconds. Mix those in and the number will cheerfully report that service is faster than ever. Everything looks wonderful; the restaurant has fallen over.

The second idea: the bar for waking someone

Knowing something is off and waking a person are two different acts. The bar this chapter sets is close to severe: anything allowed to pull a human out of bed must clear all three — genuinely urgent, genuinely something to be done, and genuinely requiring a human's judgement. That last one bites hardest: if everything you do after being woken is follow a sheet of paper and click a few times, then this should never have woken you — a machine should be doing the clicking. People get woken because a brain is needed, not a pair of hands.

Follow that bar and things sort themselves into three tiers: needs someone now — ring the phone; needs a person but not tonight — open a ticket and handle it within days; needs nobody — write it to a log, where it sits until the day something breaks and it becomes the only record of what actually happened.

The honest cost: this approach means that in the first minutes of an outage you will know that something is broken without being able to say what — so none of the detailed internal numbers can go away. They just aren't allowed to phone anyone.

One line to remember

Four things are enough: how slow, how busy, how wrong, how full — and only the last one warns you early. The bar for waking a human is urgent, actionable, and needing judgement; anything you'd answer by clicking through a checklist belongs to a machine. Once there are too many alarms, people stop believing them — and that is worse than having none.

Want the mechanisms, the numbers and the diagrams? → Switch to the deep read