Service level objectives sound like something for big companies. They are more useful for small teams, because they replace arguments about reliability with a number everyone agreed to.
The vocabulary
- SLI: a measurement of something users feel, such as the proportion of requests that succeed or complete within a time.
- SLO: the target for that measurement over a window, such as 99.5% of requests succeed over 30 days.
- Error budget: the amount of failure the SLO allows. A 99.5% target over 30 days allows roughly three and a half hours of full failure.
Start with one or two
For each user-facing service, pick:
- Availability: the fraction of requests that return a non-error response.
- Latency: the fraction of requests faster than a threshold that users would notice.
Measure them at the edge, where users are, such as the load balancer, not deep in the stack.
Set the target from reality
Look at the last few months. If you have been at 99.7%, setting 99.99% is fantasy. Pick a target slightly better than what you achieve and a little worse than what users would tolerate, then adjust.
Use the budget
When you have budget left, ship faster. When it is nearly spent, slow down and spend time on reliability. That is the entire value of the idea: a shared, objective rule for the trade-off.
Alert on burn, not on blips
Page when the budget is burning fast enough to run out soon (burn-rate alerts), and create a ticket for slower burns. Delete alerts that nobody acts on.
Keep it small
Two SLOs per service, reviewed monthly, with runbooks linked from the alerts. You can add detail later.
Our SRE and observability service helps teams set this up.