Lesson 3 of 9 · 25m
Measuring Reliability Honestly: SLIs, Latency, and Partial Failure
Instrument the boundary users experience, validate success semantics, and avoid metrics that quietly redefine failure as success.
A metrics pipeline can be perfectly healthy while the reliability measurement is nonsense. I have seen dashboards count load-balancer health checks as successful customer traffic, count retried requests three times, and treat any HTTP 200 as good even when the body said {"status":"failed"}. The tooling did exactly what it was told. The definition was the bug.
Measure near the user, not near your comfort zone
Application code is easy to instrument, but it only sees requests that reached it. A broken ingress, expired certificate, bad DNS answer, or saturated edge can make users invisible to the application. Measure at the outermost controlled boundary you can instrument consistently:
browser/mobile telemetry closest to user experience, hardest to normalize
edge proxy / API gateway strong compromise for request success and latency
service mesh useful for service-to-service dependencies
application metrics best for internal behavior, incomplete for user painUse several layers during diagnosis, but pick one as the SLO source of truth. Otherwise every incident becomes a debate about whose graph is prettier.
Success is semantic, not just numeric
A 200 is not automatically success. A payment endpoint can return 200 with authorized=false; a GraphQL endpoint can return 200 with resolver errors; an async job API can return 202 long before work completes. Encode the meaning carefully:
{"request_id":"7a64d6f4","status":"failed","error":{"kind":"upstream_timeout","retryable":true}}If this response has HTTP 200, a status-code-only SLI marks failure as success. Either fix the API contract or include an application-level success label in the SLI.
Histograms beat averages for latency
Average latency hides the tail that users remember. Prometheus histograms let you estimate quantiles:
histogram_quantile(
0.99,
sum(rate(http_request_duration_seconds_bucket{service="checkout"}[5m])) by (le)
)A 99.9% latency SLI needs enough traffic and sensible bucket boundaries. If your fastest bucket is le="1" and the objective is 300 milliseconds, the data cannot prove compliance. Buckets are part of the measurement design, not an implementation detail.
Partial availability is still availability loss
Systems rarely fail as a clean binary. Perhaps reads work and writes fail, one region is degraded, or only large tenants cannot export. You can represent partial failure with weighted SLIs, separate journey-level objectives, or a fraction-of-capacity measure. What you cannot do is call the service healthy because /healthz is green.
Validate the denominator
Denominators cause the quiet disasters. Health checks, crawlers, internal probes, retries, and client errors can swamp the valid-request count. Audit a sample of raw traffic against metric labels. If route="/healthz" accounts for 80% of requests, your ratio is mostly measuring your monitoring system.
Synthetic checks are still valuable, but they answer a different question: "is the system reachable and basically functional right now?" Real-user SLIs answer: "did the service meet the promise for the traffic that mattered?" Do not substitute one for the other.
Field notes
- Rejections before application authentication still hurt users; decide whether edge enforcement belongs in the SLI and document it.
- High-cardinality labels can destroy the metrics system before they improve the SLI. Aggregate deliberately.
- Timeouts need a badness rule. A request canceled by the client may not be a server failure, but a server-side deadline miss usually is.
- When telemetry and user reports disagree, believe the discrepancy. One of your measurements is incomplete.
Was this lesson helpful?