SkillSprout
Chapter 32 · Lesson 2
Intermediate
3 min read

Golden Signals, SLOs and Alerting

Overview

With thousands of possible metrics, the hard question is what to watch. The four golden signals, from Google's Site Reliability Engineering practice, give a short answer. An SLO then turns "reliable" into a measurable target, and alerts tell a human when it is at risk.

Detailed Notes

What are the golden signals

The four golden signals describe the health of any service:

  • Latency: how long requests take (track failures separately from successes).
  • Traffic: how much demand the system receives, e.g. requests per second.
  • Errors: the share of requests that fail.
  • Saturation: how "full" the most constrained resource is, such as CPU, memory, queue depth or connection pool. It warns you before things break.

The problem it solves

Bad monitoring either misses real outages or wakes people at 3 am for harmless blips. The golden signals focus attention on what users feel.

Averages are also misleading. A video site's average load time is a healthy 200 ms, yet 2% of requests take 10 seconds. At a million requests an hour, that is 20,000 unhappy requests every hour the average hid.

How it works

Percentiles. The p50 is the typical request. p99 means 99% of requests were at or below that time, so it exposes the slow tail. Use percentiles, not averages, and never average percentiles across servers.

SLI, SLO, error budget, SLA.

  • SLI (service level indicator): a measurement of user-relevant quality, e.g. "share of requests that succeed in under 300 ms".
  • SLO (service level objective): the internal target, e.g. "99.9% over 30 days".
  • Error budget: the allowed failure, 100% minus the SLO. At 99.9% over 30 days that is about 43 minutes of full failure. If budget remains, ship faster; if it is spent, focus on stability.
  • SLA (service level agreement): the external contract with consequences if missed, usually looser than the SLO.

Alerting principles.

  1. Alert on symptoms users feel (high error rate, high latency), not every cause such as one server's CPU.
  2. Every alert must be actionable. If no human can act, make it a dashboard or ticket.
  3. Use a time window so brief blips do not page anyone, and attach a runbook (a short guide of first steps).
  4. A burn-rate alert fires when the error budget is being used up much faster than planned, catching serious problems fast while ignoring tiny ones.

Alert fatigue is when constant noisy alerts train people to ignore them, so one real alert is missed.

A simple example

A checkout service has the SLI "requests under 300 ms and not failing", with an SLO of 99.9% over 30 days. The measured value drops to 99.2% and the budget burns too fast, so an alert pages the on-call engineer.

System design example

For each critical user journey (checkout, login, search), define SLIs and SLOs, build a golden-signals dashboard, and add symptom-based and burn-rate alerts. After every incident, delete the noisy alerts. Tight thresholds catch problems early but cause false alarms.

Summary

  • The golden signals are latency, traffic, errors and saturation.
  • Use percentiles (p95, p99), not averages.
  • SLI is the measurement, SLO the target, error budget the allowed failure, SLA the customer contract.
  • Alert on symptoms, keep every alert actionable, and prune noisy ones to avoid alert fatigue.

Architecture Diagram

From golden signals to an alert
Architecture
Servicelatency, traffic, errors
Metrics storeSLI vs SLO
Alert
On-call

Metrics are compared with the SLO; a fast-burning error budget pages a person.

  1. 1The service records latency, traffic and errors for every request.
  2. 2Metrics are stored and compared against the SLO.
  3. 3When the error budget burns too fast, an alert fires.
  4. 4The on-call engineer follows a runbook to investigate.

Common Interview Questions

Finished this lesson?

0 of 91 lessons done · 0% of the course