Choose an SLI for a REST API: availability measured at the pod, the load balancer, or the client?

IntermediateScenarioSLOs and Error Budgets
Answer

Situation read → The closer to the user, the more accurate, but the harder to measure.

What I'd do →

  1. Use the load balancer or ingress as the primary source: it captures requests that never reached pods (5xx from LB, no healthy targets).
  2. Add synthetic probes for coverage during low traffic.
  3. Use client-side RUM data for web/mobile journeys where possible.
  4. Avoid pod-level metrics alone; they miss failures before the app.
sum(rate(nginx_ingress_controller_requests{ingress="api",status!~"5.."}[5m]))
/
sum(rate(nginx_ingress_controller_requests{ingress="api"}[5m]))

Why → An SLI that cannot see failures cannot protect users.

Interview tip → Mention what counts as "valid": usually exclude 4xx caused by clients.

All Monitoring & Observability questions

More on SLOs and Error Budgets