Lesson 3 of 6 · Monitoring & Observability

Measuring What Matters

SLIs, SLOs, SLAs, KPIs, and OKRs for database teams: what each answers, with examples, and how they fit together.

Beginner 6 sections 4 min read

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.

OKRs · what we want to achieve KPIs · how the service is doing overall SLAs · what we've promised customers, with consequences SLOs · our internal reliability targets SLIs · the measurements the targets are based on Telemetry · metrics, logs, and traces from the databases and applications

SLIs, SLOs, and SLAs

You met these in Database Reliability Engineering. A quick recap, with database examples:

What it isExample for the orders database
SLI (service level indicator)A measurement of service quality from the user's viewThe share of order inserts that complete in under 200 ms
SLO (service level objective)The internal target for an SLI over a period99.9% of order inserts under 200 ms, over 30 days
SLA (service level agreement)A promise to customers, with penalties if it's missed99.5% availability each month, or service credits are paid
Error budgetThe failure an SLO allows: 100% minus the target0.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.

AreaExample KPIs for a DBA team
ReliabilityAvailability per month; number of SLO breaches; time to restore service (MTTR)
Performance95th or 99th percentile query response time for key services
Data protectionBackup success rate; share of quarterly restore tests that pass
ChangeDatabase deployment frequency; change failure rate
SecurityDays to apply critical patches; databases with outstanding findings
EfficiencyCost 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

MeasureQuestion it answersWho mainly uses itHow often
SLIHow good is the service right now?On-call engineers, dashboardsContinuously
SLOAre we reliable enough? Can we take risks?The team, product ownersDaily to monthly
SLAAre we keeping our promises?Customers, account managers, legalMonthly
KPIHow is the service, and the team, performing?Team leads, managersWeekly to quarterly
OKRWhat are we trying to improve, and are we getting there?The team and leadershipQuarterly

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.