Measuring What Matters
SLIs, SLOs, SLAs, KPIs, and OKRs for database teams: what each answers, with examples, and how they fit together.
From data to goals
Monitoring produces a flood of numbers. SLIs, SLOs, SLAs, KPIs, and OKRs are how teams turn those numbers into decisions: which measures matter, what target each should meet, what's been promised to customers, how the team is doing overall, and what it's trying to improve. Each answers a different question.
SLIs, SLOs, and SLAs
You met these in Database Reliability Engineering. A quick recap, with database examples:
| What it is | Example for the orders database | |
|---|---|---|
| SLI (service level indicator) | A measurement of service quality from the user's view | The share of order inserts that complete in under 200 ms |
| SLO (service level objective) | The internal target for an SLI over a period | 99.9% of order inserts under 200 ms, over 30 days |
| SLA (service level agreement) | A promise to customers, with penalties if it's missed | 99.5% availability each month, or service credits are paid |
| Error budget | The failure an SLO allows: 100% minus the target | 0.1% of order inserts may be slow, about 43 minutes' worth a month |
Monitoring is what makes these real: the SLI is calculated from metrics continuously, dashboards show how much error budget is left, and alerts fire when the budget is being used up too fast.
KPIs: key performance indicators
A KPI is one of a small number of measures that show how well something is performing overall, reviewed regularly by the team and its managers. SLOs focus on the user's experience right now; KPIs give a broader view of the DBA service, including how well the team itself is working.
| Area | Example KPIs for a DBA team |
|---|---|
| Reliability | Availability per month; number of SLO breaches; time to restore service (MTTR) |
| Performance | 95th or 99th percentile query response time for key services |
| Data protection | Backup success rate; share of quarterly restore tests that pass |
| Change | Database deployment frequency; change failure rate |
| Security | Days to apply critical patches; databases with outstanding findings |
| Efficiency | Cost per database; share of work that's toil; average CPU utilization |
Good KPIs are few, clearly defined, measured automatically from monitoring data, and tied to something the business cares about. A dashboard of forty KPIs is a dashboard nobody reads.
OKRs: objectives and key results
OKRs are a goal-setting method, popularized at Intel and Google: an inspiring objective, and three to five measurable key results that show whether it's been achieved, usually set each quarter. KPIs measure how things are; OKRs describe how the team wants them to change.
Objective: Make database releases boringly reliable this quarter
KR1: Raise database deployment frequency from monthly to weekly
KR2: Keep change failure rate for database releases under 5%
KR3: Every production release has a tested rollback (100%)
KR4: Cut MTTR for database incidents from 90 to 30 minutes
Every key result is measured from the same monitoring and pipeline data, so progress is visible each week without anyone compiling reports by hand.
How they fit together
| Measure | Question it answers | Who mainly uses it | How often |
|---|---|---|---|
| SLI | How good is the service right now? | On-call engineers, dashboards | Continuously |
| SLO | Are we reliable enough? Can we take risks? | The team, product owners | Daily to monthly |
| SLA | Are we keeping our promises? | Customers, account managers, legal | Monthly |
| KPI | How is the service, and the team, performing? | Team leads, managers | Weekly to quarterly |
| OKR | What are we trying to improve, and are we getting there? | The team and leadership | Quarterly |
In practice: monitoring provides the telemetry; SLIs are calculated from it; SLOs set targets for SLIs, stricter than any SLA; KPIs summarize the service's health; and OKRs pick the KPIs to improve next. When an OKR targets lower MTTR, for example, the team invests in better dashboards and runbooks, and the monitoring data shows whether it worked.
Key takeaways
- SLIs measure the service, SLOs set internal targets, and SLAs are promises to customers; error budgets come from SLOs.
- KPIs are a few key measures of how the database service and team are performing, such as availability, MTTR, and backup success.
- OKRs set quarterly goals, an objective plus measurable key results, describing what the team wants to improve.
- All of them are calculated from monitoring data, so good monitoring makes them automatic and trustworthy.