SLO template: HTTP API
For a REST or HTTP service, the SLI is the share of requests that succeed.
What to measure
Start from the status codes your service returns: count 5xx responses as failures and everything else as success. The wizard reads a request counter such as http_requests_total and a status label, then derives the success rate for you.
A sensible starting SLO
A 99.9% availability SLO over 28 days leaves roughly 40 minutes of error budget. Start there, watch a few weeks of real data, and tighten only if your users would notice the difference.
Pre-filled in the wizard
These are the exact values the wizard loads when you open this template. Rename them to match your own service and metric.
| Service name | api-gateway |
|---|---|
| SLO name | api_availability |
| SLI kind | availability |
| SLI type | request_based |
| Metric | http_requests_total |
Pitfalls
- Do not count 4xx responses as failures: they are usually client mistakes, and they would burn budget you do not control.
- Health checks and probes can dominate the traffic of a quiet service and flatter the success rate. Exclude them from the metric if they do.