SDSystem DesignConcepts to case studies
System DesignDSA
x
0/311
Part 1: Foundations
  • What is System Design?
  • High-Level Design (HLD)
  • Low-Level Design (LLD)
  • Functional vs Non-Functional Requirements
  • Back-of-the-Envelope Estimation
  • Numbers Every Engineer Should Know
  • SLA, SLO and SLI
  • Basic OS: Process, Thread, Memory
  • 30 Must-Know Concepts
Part 2: APIs and Communication
Part 3: Caching
Part 4: Data and Storage
Part 5: Architecture
Part 6: Distributed Systems
Part 7: Advanced Data Topics
Part 8: Operations and Security
Part 9: Estimation and Interview Method
Part 10: Case Studies
System Design/Foundations/Introduction

SLA, SLO and SLI

Three words for promises about reliability: what you measure, what you aim for, and what you promise.

⏱ 13 min readBeginnerMust KnowInterview FavouriteHas visualizer
SummaryConceptReal-Life ExampleWhy?Where?How It WorksStepsKey TermsPros & ConsMistakesReal WorldRead NextInterview Q&ACheat-Sheet

01Quick Summary

SLI, SLO and SLA are three words for talking about reliability in numbers. They sound alike, but each one does a different job.

  • SLI (Service Level Indicator) is the measurement. For example: “99.95% of requests succeeded this month.”
  • SLO (Service Level Objective) is the target you set for that measurement. For example: “at least 99.9%.”
  • SLA (Service Level Agreement) is the contract with customers, with a penalty if you miss it. For example: “below 99.5%, you get a refund.”
  • The gap between perfect and your SLO is the error budget: the amount of failure you are allowed to spend.

02Concept: What is it?

“Our service is reliable” means nothing until you say how you measure it and how good is good enough. These three ideas turn a feeling into a number.

From measuring to promising
📏SLIwhat we measure
→↓compare to
🎯SLOour target
→↓looser than
📜SLAthe promise + penalty
Each layer builds on the one before it. The SLA is usually looser than the SLO, so you get a warning before you owe anyone money.

SLI: the thing you measure

An SLI is a number that tells you if users are happy. Good SLIs are close to what users feel: the share of requests that succeed, the share that finish faster than 300 ms, or the share of data that is fresh enough. CPU use is a poor SLI, because a busy CPU does not always mean a bad experience.

SLO: the target you aim for

An SLO is a goal on an SLI over a period of time, such as “99.9% of requests succeed over 30 days.” It is an internal goal. Missing it is a signal to slow down and fix things, not a legal problem.

SLA: the promise you can be held to

An SLA is a written agreement with a customer. It usually names the target and what happens if you miss it: service credits, refunds or other penalties. Because it has real costs, an SLA is set looser than the SLO you aim for.

🧠Error budget
Error budget = 100% − SLO. A 99.9% SLO over a 30-day month allows about 43.2 minutes of failure. A 99.99% SLO allows only about 4.3 minutes. The budget is the room you have to ship changes, take risks, and survive bad luck.

03Real-Life Example

🍵The pizza shop
A pizza shop promises “delivered in 30 minutes.” The shop tracks how long each delivery really takes (SLI). The manager sets an internal goal: 95% of pizzas arrive within 30 minutes (SLO). The printed coupon on the box says: “Late by more than 45 minutes? Your pizza is free” (SLA). The coupon is looser than the goal, so the manager sees trouble long before the shop starts giving pizzas away.
Pizza shop
Online service
Time each delivery took
SLI, such as the share of fast, successful requests
“95% within 30 minutes”
SLO: the internal target
“Free pizza if over 45 minutes”
SLA: the customer promise with a penalty
The few late pizzas you can afford
Error budget
Stopping new menu experiments when too many are late
Pausing risky releases when the budget is used up
The manager’s daily check of late orders
Monitoring and alerts on the SLI
Three levels of the same number
SLI today (measured)99.95%
SLO (our target)99.9%
SLA (the promise)99.5%
The values are illustrative.

04Why Do We Need It?

🗣️A shared language
Teams, managers and customers can say “99.9% of requests under 300 ms” instead of arguing about “fast enough”.
⚖️Speed vs safety
The error budget gives a fair rule: while there is budget, ship fast. When it is gone, fix reliability first.
💰Honest cost
Every extra nine costs much more. A target forces the question: is it worth it for this feature?
🤝Trust with customers
A clear SLA says what the customer can expect and what happens if you fail.
🚨Better alerts
Alert when the budget burns too fast, not on every small blip. This means fewer false alarms.
🧭Where to invest
SLI numbers show which service is hurting users most, so you fix the right thing.
You cannot improve, or promise, what you do not measure. SLIs measure it, SLOs aim it, SLAs promise it.

05Where Do We Use It?

☁️Cloud providers
Public cloud services publish SLAs, with credits if monthly uptime falls below the promised level.
🛠️Site reliability teams
SRE teams write SLOs for each service and use the error budget to decide when to pause releases.
💳Payments and banking
Contracts with partners often include strict uptime and latency SLAs.
📡APIs and platforms
Companies that sell an API publish its uptime target and support response times.
🏢Internal platforms
A database team may give other teams an internal SLO, even without a legal SLA.
🧪Design interviews
“What is your availability target?” is a common question. Answering with a number shows you think in SLOs.

06Types / Parts / How It Works

The three terms side by side

TermWhat it isWho it is forIf you miss it
SLIA measured numberEngineersNothing by itself. It is just a fact.
SLOA target on that numberThe team (internal)Slow down, fix reliability, review what happened
SLAA written promise to customersCustomers and lawyersCredits, refunds or other penalties

Common SLIs

KindExample SLIGood for
AvailabilitySuccessful requests ÷ all requestsIs it up and answering?
LatencyShare of requests faster than 300 ms (or p99 under 1 s)Is it fast enough?
CorrectnessShare of answers that are rightIs the data right?
FreshnessShare of records updated within 1 minutePipelines and caches
DurabilityShare of stored objects that can still be readStorage systems

How downtime budgets look (30-day month)

SLOError budgetReal meaning
99%7.2 hoursFine for internal tools
99.9%43.2 minutesA common goal for normal web services
99.99%4.32 minutesNeeds automatic failover and strong operations
99.999%about 26 secondsVery costly. A human cannot even react in time.
One month's budget at 99.9%
🟢43.2 min budget
→↓−12 deploy
🟡31.2 left
→↓−25 outage
🔴6.2 left
Safe to take risks Be careful Almost out
Incidents spend the budget. When it is gone, the team switches from features to reliability.
VisualizerError budget: pick an SLO and an SLA, then add incidentsSwitch incidents on and off to spend the month's budget. Try a 99.99% SLO and see how little room there is. Then set the SLA stricter than the SLO and read the warning.
SLO (your internal target)
SLA (the promise to customers)
One 30-day month (each square is a day). Red = a day with an incident.
Error budget used: 12.0 min of 43.2 min allowed by the SLO
0SLO budget: 43.2 min
SLI (measured)
99.972%
good time ÷ total time
SLO budget
43.2 min
allowed down at 99.9%
Budget left
31.2 min
this month
SLA budget
3.6 hours
allowed down at 99.5%
Contract
Kept
no credit
Within the SLO. The measured SLI is 99.972%, and 31.2 min of error budget is left this month. You can still afford risky changes.

A simple model that measures availability as time. Real SLIs are often counted in requests (good requests ÷ all requests). The incidents and their lengths are made up for teaching (illustrative).

07How to Use It / Steps / Implementation

Setting your first SLOs

  1. 1
    Pick what users care about
    Start from the user journey: can they log in, search, pay? Choose one or two things per journey, not fifty.
  2. 2
    Choose an SLI for each
    Write it as good events ÷ all events. For example: requests that return a non-error answer in under 300 ms ÷ all requests.
  3. 3
    Measure first
    Look at the last few weeks of real data. A target far from reality is useless.
  4. 4
    Set the SLO a little tighter than today
    Aim for what users need, not for perfection. Every extra nine costs a lot more than the one before.
  5. 5
    Calculate the error budget
    Turn the percentage into minutes or request counts, so everyone can see what “allowed failure” looks like.
  6. 6
    Agree on the rules
    Decide in advance what happens when the budget is used up: for example, a freeze on risky releases until reliability work is done.
  7. 7
    Set the SLA looser, if you need one
    Keep a safety gap between the SLO and the SLA. Review both regularly, because users and systems change.
💡Alert on budget burn
Instead of paging on every error, page when the error budget is being used much faster than normal. This catches real problems and ignores tiny blips.
⚠️Dependencies limit you
Your service cannot be more available than the things it needs all at once. If you depend on three services that are each 99.9%, your best case is about 99.7%.

08Key Terms to Know

TermMeaning in easy words
SLIService Level Indicator: a number that measures how well the service is doing
SLOService Level Objective: an internal target for an SLI over a period of time
SLAService Level Agreement: a contract with customers, with penalties if missed
Error budgetHow much failure the SLO allows. 100% minus the SLO.
Burn rateHow fast the error budget is being used compared with the normal pace
NinesA short way to say availability: 99.9% is “three nines”
UptimeThe share of time the service is working
Percentile (p99)The value that 99% of requests are faster than. Used for latency SLIs.
Service creditA refund or discount given to a customer when an SLA is missed
WindowThe time period an SLO is measured over, such as 30 days
ToilRepeated manual work that could be automated. Often cut by reliability work.

09Pros, Cons and Trade-offs

✅ Pros
  • Turns “reliable” into a clear number
  • Gives teams a fair rule for speed vs safety
  • Makes alerts smarter and quieter
  • Helps decide where to spend money
  • Builds trust with customers
⚠️ Cons
  • A bad SLI can hide real pain
  • Too many SLOs become noise
  • A very tight target is very costly
  • SLAs can create legal risk
  • Needs good measurement and data

Trade-offs

ChoiceWe gainWe lose
Tighter SLOHappier users, fewer outagesMore cost, slower releases, less room for risk
Looser SLOCheaper and faster to shipMore failures that users can see
Short window (7 days)Quick feedback on problemsNoisy: one bad day can break the SLO
Long window (90 days)Smooth and fairSlow to notice and react
Counting requestsMatches what users feelNeeds request-level data
Counting timeSimple to explainHides how many users were hit, or whether it was night

10Common Problems and Mistakes

Common mistakes

  1. Mixing up the three words. An SLA is not a measurement, and an SLO is not a contract.
  2. An SLA tighter than the SLO. You can owe money before your own alarm rings.
  3. Aiming for 100%. It is impossible and it freezes all change. Pick a number that users truly need.
  4. Measuring the wrong thing. A healthy server does not mean a happy user. Measure from the user’s point of view.
  5. Averages instead of percentiles. An average latency can look fine while 1 in 100 users waits for ten seconds.
  6. Ignoring dependencies. Your target is capped by what you rely on.
  7. Setting a target and never reviewing it. Needs and traffic change over time.

Things to watch

🔥Fast burn
A big outage can use the whole month’s budget in an hour. Alert on burn rate.
🧮Planned downtime
Decide whether planned maintenance counts against the budget. Write it down.
🕳️Measurement gaps
If monitoring itself is down, your SLI is blind. Measure from outside the system as well.
📉Low-traffic periods
At night, ten failures can be a big share of a few requests. Pick the window and the SLI with this in mind.

11Real-World Examples

☁️Cloud storage and compute
Large cloud providers publish an uptime percentage per service, and give credits when it is missed. Check the current terms for exact numbers.
🔍Site reliability engineering
The idea of SLOs and error budgets was spread by Google’s SRE practice and is now common across the industry.
💳Payment providers
Payment APIs commonly publish uptime targets and status pages, because downtime means lost sales for every merchant.
📺Video streaming
Streaming services watch SLIs such as the share of playbacks that start in a few seconds without buffering.
🛒Online shops
Checkout often has a stricter SLO than browsing, because a failed checkout loses money right away.
🏥Health systems
Systems where lives depend on the answer aim for much higher targets and have careful backup plans.
📝Note
Providers change their SLAs and tiers over time. Read the current agreement for exact numbers before relying on them.
Mini case: checkout versus browsing
Browse products
🔎SLO 99.5%~3.6 h budget
Checkout
💳SLO 99.95%~21.6 min budget
Different journeys can have different SLOs. The numbers are illustrative.

12Related Topics to Read Next

Availability→

The most common SLI. It is measured in nines.

Reliability→

Being correct as well as being up.

Alerts and Monitoring→

How SLIs are watched and how alerts fire on budget burn.

Latency vs Throughput vs Bandwidth→

The ideas behind latency SLIs.

Fault Tolerance and Redundancy→

How you reach a high SLO in practice.

Dashboards and Runbooks→

Where SLOs are shown and acted on.

13Interview Questions with Short Answers

14Quick Revision Cheat-Sheet

  • ✔SLI: what you measure. SLO: what you aim for. SLA: what you promise, with a penalty.
  • ✔Order: SLA looser than SLO, SLO tighter than today’s SLI.
  • ✔Error budget: 100% − SLO. 99.9% over 30 days is about 43 min.
  • ✔Good SLI: good events ÷ all events, seen from the user’s side.
  • ✔Latency: use percentiles (p95, p99), not averages.
  • ✔Budget gone: slow releases and fix reliability.
  • ✔Alerts: page on budget burn rate, not on every blip.
  • ✔One line: “Measure it, set a target, and promise less than you aim for.”
← Previous
Numbers Every Engineer Should Know
Next →
Basic OS: Process, Thread, Memory