Auth SLOs and error budgets: setting reliability targets that matter
When login is down, your entire product is down, no matter how healthy every other service looks. Auth sits on the critical path of every authenticated request, which makes its reliability target the ceiling on everyone else's. A checkout service with four nines of availability is still a checkout service with three nines if the auth it depends on only hits three. Setting an explicit SLO for authentication, and spending its error budget deliberately, is how you stop treating that dependency as invisible.
Pick indicators that match what users feel
A good auth SLO starts with service level indicators that correspond to real user pain, not server-side vanity. Three carry most of the weight: login success rate (of legitimate attempts, how many produce a valid session), token issuance and validation latency (how long the critical-path auth call takes), and availability of the auth endpoints themselves. Notice that success rate must exclude expected failures: a user typing the wrong password is not an outage, and if you count it as one your SLI becomes noise.
-- Login success SLI: successes over *valid* attempts in a window.
-- Exclude user error (bad password, expired reset) from the denominator;
-- those are correct rejections, not reliability failures.
SELECT
count(*) FILTER (WHERE outcome = 'success')::float
/ NULLIF(count(*) FILTER (
WHERE outcome IN ('success','server_error','timeout','upstream_down')
), 0) AS login_success_sli
FROM auth_events
WHERE event = 'login_attempt'
AND occurred_at >= now() - interval '28 days';Set targets from dependency math, not aspiration
The auth SLO is not a number you pick because it sounds good; it is constrained from above by physics. If ten critical services each call auth once per request and you want them to hit 99.9%, auth itself must be meaningfully better than 99.9%, because its failures multiply through every caller. Work backwards: decide the user-facing reliability you are committing to, then set the auth target high enough that it is not the limiting factor.
// Error budget from an availability target over a 28-day window.
const WINDOW_MINUTES = 28 * 24 * 60; // 40,320
const target = 0.9995; // 99.95% availability for auth
const budgetMinutes = WINDOW_MINUTES * (1 - target); // ~20.16 min/28d
// Burn rate: how fast you're spending it right now.
function burnRate(badMinutesLastHour: number): number {
const hourlyBudget = budgetMinutes / (WINDOW_MINUTES / 60);
return badMinutesLastHour / hourlyBudget; // >1 means you'll blow the budget
}The error budget is a decision tool, not a report
An error budget only earns its keep if it changes behavior. The point of saying "auth may be unavailable for twenty minutes this month" is that those twenty minutes are a currency you spend on purpose: on risky deploys, dependency upgrades, and migrations. When the budget is healthy, ship aggressively. When it is nearly exhausted, the policy should automatically tighten: freeze non-critical auth changes, divert the on-call's attention, and require extra review before touching the login path.
Alert on burn rate, not on every blip
Paging a human every time one login fails trains them to ignore the pager. Multi-window burn-rate alerting is the mature pattern: page loudly when the budget is burning fast enough to be exhausted within hours, and raise a quieter ticket when a slow burn will exhaust it over days. This distinguishes "auth is actively on fire" from "something is subtly degrading," and only the first deserves a 3 a.m. call.
Latency is a reliability concern too
Availability gets the attention, but auth latency silently taxes every request behind it. A token validation that creeps from 10ms to 150ms adds that delay to every authenticated call in the product, and users experience it as the whole app getting slow. Put a latency objective on the critical-path auth operations, measured at a high percentile where the pain lives, and treat a latency regression as a budget-spending event even when nothing technically "failed."
Review the budget, not just the incidents
The ritual that makes this stick is a regular review where the team looks at how much error budget was spent, on what, and whether the spending bought anything. A budget consumed entirely by a dependency's flakiness is a signal to invest in isolation; a budget barely touched might mean you are being too conservative and could ship faster. The number is a conversation starter about where reliability effort should go.
Setting and spending an auth error budget requires raw access to the auth events, the latency distribution, and the per-tenant breakdowns, which is exactly what a black-box login provider tends to summarize away behind a status page you do not control. When you run identity yourself, the SLIs are yours to measure and the budget is yours to spend, which is one more reason teams choose to own their auth with a platform like Bastionary rather than inherit someone else's opaque reliability.
Run it yourself
Bastionary is free, open-source software. Follow the quick start to have it running on your own server, or browse the releases on Git.