Error Budget Policy
1. Purpose
This policy establishes guidelines for managing the error budget for [Service/Product Name], balancing reliability (measured by Service Level Objectives or SLOs) with velocity (feature development and releases). The error budget represents the allowable downtime or errors before reliability work takes precedence over new features.
- SLO Target: [e.g., 99.9% availability over a 28-day rolling window].
- Error Budget: 100% - SLO = [e.g., 0.1% or ~43 minutes per 28 days].
- Budget Window: 28-day rolling period (configurable per service).
The policy enforces gates, burn-rate alerts, and roadmap ties to ensure sustainable operations.
2. Error Budget Calculation
- Formula:
Error Budget Remaining = (SLO Target % * Window Duration) - (Observed Errors * Window Duration)
- Measurement: Track via [monitoring tool, e.g., Prometheus/Grafana] using SLI (Service Level Indicators) like error rate, latency, or availability.
- Replenishment: Budget automatically refills as the window rolls forward (no manual reset).
3. Burn-Rate Alerts
Burn rate measures how quickly the error budget is consumed. Alerts trigger at defined thresholds to prompt investigation before exhaustion.
Alert Types
| Burn Rate Type | Time Window | Threshold | Severity | Action |
|---|
| Short-term | 1 hour | >100% (spending faster than allowed) | Critical (P0) | Page on-call; immediate rollback/hotfix. |
| Short-term | 6 hours | >50% | High (P1) | Notify engineering leads; assess impact. |
| Long-term | 28 days | >100% (budget exhausted) | Critical (P0) | Enforce gates; shift to reliability mode. |
| Long-term | 28 days | 75-100% | Warning (P2) | Weekly review in standup; prep reliability tasks. |
- Alert Configuration:
- Integrate with [e.g., PagerDuty/Slack] for notifications.
- Auto-suppress during approved outages (e.g., maintenance windows).
- Response SLA: Acknowledge alerts within 15 minutes; resolve root cause within 4 hours for P0/P1.
4. Gates
Gates are automated/manual checkpoints to protect the error budget. Violations block progression.
Release Gates
| Gate | Condition | Enforcement | Override |
|---|
| Pre-Deploy | Budget < 25% remaining OR short-term burn >100% | Block CI/CD pipeline (e.g., via GitHub Actions/Spinnaker). | 2-person approval from EM + SRE lead. |
| Post-Deploy | Error rate > SLO within 1 hour post-release | Auto-rollback feature flag. | None (safety first). |
| Promotion to Prod | Long-term burn >50% | Manual gate review in [e.g., Jira ticket]. | Quarterly business justification. |
- Implementation: Use policy-as-code tools (e.g., OPA/Gatekeeper) for enforcement.
- Feature Flags: All features deploy behind flags; toggle off if budget burns >50% post-deploy.
Other Gates
- Capacity Planning: Block scaling down if budget <50%.
- Experimentation: Limit A/B tests to <10% traffic if budget <75%.
5. Roadmapping Ties
Error budget directly influences prioritization to prevent reliability debt.
Decision Framework
| Budget Status | Roadmap Impact | Actions |
|---|
| >75% Remaining (Healthy) | Full velocity: Prioritize features. | Business as usual; allocate 50% eng to features. |
| 25-75% Remaining (Caution) | Balanced: Features + reliability. | 70/30 split (features/reliability); weekly budget review in roadmap grooming. |
| <25% Remaining (Exhausted) | Reliability-first: No new features. | 100% to toil reduction; pause roadmap items marked "feature"; re-evaluate quarterly. Block merges labeled "feature:*". |
| Budget Replenished (>50%) | Resume velocity. | Retrospective on consumption; unblock roadmap. |
- Integration:
- Roadmap Tool: [e.g., Jira/Roadmunk] – Tag epics with "budget-blocked" status; auto-archive if exhausted >14 days.
- Quarterly Reviews: EM + Product + SRE review budget trends; adjust SLO if chronically low.
- SRE-to-Product Escalation: If budget exhausted >7 days, escalate to execs for reprioritization.
- Retrospectives: Post-exhaustion, conduct blameless post-mortem; feed insights into next quarter's roadmap.
6. Exceptions and Evolution
- Overrides: Limited to critical business needs (e.g., security fixes); log and review quarterly.
- Policy Review: Bi-annual audit; adjust thresholds based on historical data.
- Ownership: SRE team owns enforcement; Product/Eng owns compliance.
Effective Date: [Date]
Version: 1.0
Contacts: SRE Lead ([email]), Product Lead ([email])
This policy ensures [Service] maintains SLOs while enabling innovation. Violations trigger automated remediation.