LOAD-BEARINGfree
High-level designTier 9 · unit 1 of 10 · 12 min read

Observability that answers questions

Your system is in production. Something is slow, or wrong, or both — and the first question is embarrassingly basic: how would you even know? There's a distinction worth taking seriously here: monitoring tells you when a known thing broke ("CPU is high", "error rate spiked" — questions you thought to ask in advance). Observability is the stronger property: enough signal is coming out of the system that you can answer questions you never anticipated — "why are checkout requests from Android users in Rajasthan slow only on Tuesdays?" Production always asks questions you didn't plan for. Let's build the toolkit.

The three signals — and what each is for

  • Metrics — numeric time series: request counts, latency histograms, queue depth. Dirt cheap to collect and store, easy to aggregate and graph, perfect for dashboards and alerts. Their limit: they're aggregates — a metric tells you that 2% of requests failed, never which ones or why. Alert on metrics.
  • Logs — discrete events with full context: "user 4812's payment failed: card_declined, request abc-123". Precise, rich — and expensive at volume (logging every request at high QPS costs real money to ship and store). Two rules of civilisation: log structured JSON, not free-text prose (machines will search these, not humans with eyeballs), and always include a request ID — because that ID is what lets you pull every log line, from every service, for one specific user's one specific bad experience.
  • Traces — one request's complete journey across every service it touched, with timing per hop, drawn as a waterfall. When a page load fans out to eleven services and comes back slow, a trace is the only tool that answers "which of the eleven was it?" — you just look at the widest bar. Metrics say "something's slow"; traces point at the culprit.

Two acronyms that cover most dashboards

RED for every service: Rate (requests/sec), Errors (failure fraction), Duration (latency distribution). USE for every resource (CPU, disk, connection pool): Utilisation (how busy), Saturation (how much work is queued — the leading indicator; a full queue predicts pain before utilisation shows it), Errors. If a dashboard shows RED per service and USE per resource, you're covered for most incidents before they're incidents.

Percentiles, not averages — the arithmetic of misery

Average latency is a lie told by fast requests. Concretely: p50 is 40 ms, p99 is 3 seconds → the mean works out around 70 ms and looks fine on a dashboard — while one user in a hundred stares at a spinner for three full seconds. Track p50, p95, p99, p99.9.

And now the multiplier that makes tails the number at scale: modern pages fan out. If rendering one page makes 100 backend calls, the chance a user dodges every p99-slow response is 0.99¹⁰⁰ ≈ 37% — meaning ~63% of page loads hit at least one worst-1% response. The tail isn't an edge case; at fan-out, the tail is the typical experience. This is why serious teams obsess over p99 and treat the mean as decoration. (Related habit: never average percentiles across servers — the average of ten p99s is not the fleet's p99; aggregate the underlying histograms.)

Alerting: symptoms, not causes

Page a human when users are hurting: error rate above threshold, p99 above threshold, queue lag growing. Do not page on causes: "CPU above 80%" wakes someone at 3am for a machine that's... efficiently using the hardware, while users are fine. Cause-based alerts train responders to ignore alerts — and then the real one gets ignored too. Resource metrics belong on the diagnosis dashboard, not the pager. The test for every alert: if this fires, is there a user-visible problem and an action to take? Two nos = delete it.

The trap

Logging everything at maximum verbosity "just in case," then discovering your observability bill rivals your compute bill and searches take minutes because you're grepping an ocean. The professional kit: metrics for everything (cheap), sampled traces (say 1% of normal requests, 100% of errors), and logs at INFO with request IDs — turned up per-component only while actively hunting. Signal, not hoarding.

When this actually happened

Roblox Return to Service 10/28–10/31 2021Roblox · October 2021

Seventy-three hours down, and the length is the lesson. A new Consul streaming feature under unusual load met a pathological free-page issue in BoltDB, and engineers cycled through several wrong root-cause theories before finding it — partly because the telemetry they needed to diagnose it depended on the system that was failing. One of the most detailed public writeups in existence.

Going deeper

  • Site Reliability Engineering, ch. 6 — Monitoring Distributed Systems Google, 2016
    The four golden signals, and the argument for symptom-based monitoring. Free to read online.
  • The Tail at Scale Dean & Barroso, CACM 2013
    Why p99 dominates once a request fans out, and the techniques for containing it. Short, and it changes how you read latency graphs.