How do you define SLOs, SLIs, and error budgets for a Kubernetes-hosted payments service, and how do they drive engineering decisions?
Quick Answer
SLIs are measurable signals like latency and error rate. SLOs set targets around those SLIs (e.g., 99.95% of payment transactions complete under 500ms). Error budgets are the allowed failure margin — when the budget is exhausted, teams shift from feature work to reliability improvements.
Detailed Answer
Think of a bank account for reliability. Your SLO is like your minimum balance requirement, your SLI is the actual balance, and your error budget is the amount you can spend before hitting that minimum. When you overspend, the bank restricts your account — similarly, when your error budget is exhausted, engineering shifts priorities from new features to reliability work.
In a banking context, SLIs (Service Level Indicators) are concrete measurements taken from your Kubernetes-hosted payments-api service. Common SLIs include request latency at the 99th percentile, error rate as a percentage of total requests, and availability measured as successful health checks over time. For a payments service handling wire transfers and ACH transactions, you might track the percentage of transactions that complete end-to-end within 2 seconds, the rate of 5xx errors returned by the settlements-processor, and the availability of the fraud-detector service during business hours. These metrics are collected via Prometheus ServiceMonitors scraping /metrics endpoints on each pod, and they feed into Grafana dashboards that the platform team monitors.
SLOs (Service Level Objectives) are targets set around SLIs. For a regulated payments service, you might define: 99.95% of payment API requests return successfully within 500ms, 99.99% of settlement batch jobs complete within the processing window, and the fraud-detector must be available 99.97% of the time during trading hours. These SLOs are negotiated between the platform SRE team, product owners, and compliance officers. In banking, SLOs often need to align with regulatory requirements — PCI-DSS mandates certain uptime and data integrity guarantees, and your SLOs should be stricter than any regulatory floor to give you breathing room.
Error budgets are calculated as 100% minus the SLO target over a rolling window. If your payments-api has a 99.95% availability SLO over 30 days, your error budget is 0.05%, which translates to roughly 21.6 minutes of allowed downtime per month. The platform team tracks error budget consumption in real time using tools like Sloth or custom Prometheus recording rules. When the budget is more than 50% consumed, alerts fire and the team reviews recent deployments and changes. When the budget is fully consumed, the team enacts a reliability freeze — no new feature deployments to the payments namespace, and all engineering effort shifts to reducing toil, fixing flaky tests, improving observability, and hardening the deployment pipeline.
In production at a bank, the SRE team typically runs weekly error budget review meetings. These meetings examine which incidents consumed budget, whether the consumption was from planned maintenance or unexpected failures, and what systemic improvements would prevent recurrence. The payments-api team might discover that 80% of their error budget was consumed by a single database failover event, leading them to invest in connection pool tuning and read replica routing. The error budget model also drives architectural decisions — if the settlements-processor consistently burns through its budget, the team might propose moving from synchronous to asynchronous processing with Kafka queues, giving the service more resilience against downstream latency spikes.
A critical gotcha in banking environments is that not all SLO violations are equal from a regulatory perspective. A brief latency spike on a read-only account balance endpoint is very different from a data integrity issue on a funds transfer. Teams should implement tiered SLOs — critical payment paths get stricter targets and separate error budgets from informational endpoints. Another common mistake is setting SLOs too aggressively early on (like 99.99% when your infrastructure can only realistically deliver 99.9%), which results in a permanently exhausted error budget and teams ignoring the system entirely. Start with achievable targets based on historical data, then tighten them as reliability improves.