Where should an SLI be measured — client, load balancer, or server — and how does the choice change what your SLO means?
Quick Answer
Measure as close to the user experience as feasible: server-side SLIs miss whole failure classes (DNS, LB, network, TLS, the server being down), LB-side catches most of those, and client/synthetic measurement catches everything but adds noise you don't control. Most teams should anchor SLOs at the load balancer and complement with synthetic probes; pure server-side SLOs quietly overstate reliability.
Detailed Answer
The measurement point defines the denominator. Server-side (app metrics): cheapest, richest labels — but requests that never reached the app (crashed pods, connection-refused, LB misroutes, DNS failures) simply don't exist in the data, so your 'availability' excludes exactly the worst outages; a service that's down reports no errors. LB/gateway-side: sees every request that reached your edge including 5xx from dead backends and timeouts — the sweet spot of coverage vs control for most services; this is where the SLO's error and latency SLIs should usually live. Client-side (RUM) and synthetics: capture DNS, CDN, TLS, last-mile — the real user truth — but RUM mixes in user networks/devices you can't fix, so it's better for tracking than for paging; synthetics give controlled outside-in coverage for the paths RUM can't (before launch, low-traffic endpoints) and catch 'green dashboards, site down' failures. Practical answer: page on LB-measured multi-window burn rate, run synthetics as the independent check, watch RUM for trend truth, and keep server-side metrics for debugging. And measure latency as a distribution at the same point — a p99 SLI computed from per-pod averages is fiction.
Code Example
# SLI at the edge (envoy/ALB), not the app slo: checkout-availability sli: 1 - (lb_5xx + lb_timeouts) / lb_requests window: 30d, objective: 99.9% synthetic: probe /checkout from 3 regions every 30s # catches 'nothing reaches the LB' rum: track true user p95 as trend, not page
Interview Tip
'A dead server reports no errors' is the sentence that shows you understand why server-side availability SLIs lie. Then name the layered answer: page at the LB, verify with synthetics, trend with RUM.