The SRE Mindset (Site Reliability Engineering)
This document explores the fundamental concepts of Site Reliability Engineering (SRE), focusing on the triad that sustains the reliability of modern systems: SLIs, SLOs, and Error Budgets.
1. What is SRE?
Section titled β1. What is SRE?βSite Reliability Engineering (SRE) is a discipline that incorporates aspects of software engineering and applies them to IT operations problems. The goal is to create ultra-scalable and highly reliable software systems.
As the saying goes at Google: βSRE is what happens when you ask a software engineer to design an operations function.β
2. Service Level Indicators (SLIs)
Section titled β2. Service Level Indicators (SLIs)βService Level Indicators are quantitative measures of the level of service being provided.
- Definition: A direct measurement of a serviceβs behavior.
- Common Examples:
- Latency: Time taken to service a request.
- Availability: Fraction of the time that the service is usable.
- Throughput: Number of requests processed per second.
- Error Rate: The percentage of requests that failed.
Pro Tip: A good SLI should clearly indicate whether the user is happy or not.
3. Service Level Objectives (SLOs)
Section titled β3. Service Level Objectives (SLOs)βService Level Objectives are target values or ranges of values for a service level that is measured by an SLI.
- Definition: SLI <= Target (or SLI >= Target).
- Importance: SLOs define what is βacceptableβ for the business and the users.
- Example:
- β99.9% of database read requests must complete in less than 200ms over a 30-day window.β
4. Error Budgets
Section titled β4. Error BudgetsβThe Error Budget is the direct consequence of the SLO. It represents the amount of failure that can be tolerated before the SLO is violated.
The Formula
Section titled βThe FormulaβError Budget = 100% - SLO
- If the Availability SLO is 99.9%, the Error Budget is 0.1%.
- What is it used for?
- Innovation vs. Stability: If you have plenty of βbudget,β you can launch new features quickly. If the budget is nearly exhausted, you must focus on stability and fixes.
- Alignment: It unites Development (Dev) and Operations (Ops) teams under a common objective.
5. Summary of the Relationship
Section titled β5. Summary of the Relationshipβ| Concept | Question Answered | Example |
|---|---|---|
| SLI | βWhat are we measuring?β | HTTP 200 Success Rate. |
| SLO | βWhat is the ideal value?β | 99.5% success per month. |
| Error Budget | βHow much can we fail?β | 0.5% allowed failures. |
6. Best Practices
Section titled β6. Best Practicesβ- Less is More: Donβt try to measure everything. Choose the 3-5 most critical indicators for the user experience.
- Donβt Aim for 100%: Perfection is impossible and extremely expensive. Users usually donβt notice the difference between 99.9% and 100% (due to their own internet reliability).
- Blame-Free Culture: When an SLO is violated, the focus should be on system improvement, not on finding someone to blame.