SLOs and Error Budgets
An availability target is only useful if missing it *changes what the team does* — otherwise it is a number in a slide deck, and everyone already knows it.
What is it?#
Three terms, in increasing order of consequence:
| Is a | Missing it costs you | |
|---|---|---|
| SLI | measurement — good events ÷ valid events | Nothing. It is just a number |
| SLO | internal target for that SLI | An engineering decision you agreed in advance |
| SLA | external contract with a customer | Money |
An error budget is the arithmetic remainder: 1 − SLO, expressed as the amount of failure you are allowed. At 99.9% monthly, that is about 43 minutes.
Why it exists#
Not to measure reliability. To settle an argument before it happens.
Every team has the same recurring fight: the product side wants to ship, the operations side wants to be careful, and each round is re-argued from scratch with no shared basis for deciding.
An error budget replaces opinion with arithmetic:
| Without an error budget | With one |
|---|---|
| "Is it safe to deploy?" — reargued weekly | Check the budget |
| Reliability work competes with features | Spending the budget creates the mandate |
| The careful engineer is "blocking" | The policy blocks, not a person |
| 100% is implicitly the target | The target is explicit and affordable |
What it is made of#
The nines, in time you can actually picture#
| SLO | Downtime / month | Downtime / year | Feels like |
|---|---|---|---|
| 99% | 7.3 hours | 3.65 days | Noticeable weekly |
| 99.9% | 43.8 minutes | 8.8 hours | One bad deploy |
| 99.95% | 21.9 minutes | 4.4 hours | Tight for a small team |
| 99.99% | 4.4 minutes | 52.6 minutes | Needs multi-AZ and automation |
| 99.999% | 26 seconds | 5.3 minutes | No human can respond in time |
Choosing an SLI that means something#
The SLI has to be measured where the user is, and count what the user notices.
| Weak SLI | Why it lies | Better |
|---|---|---|
| Server CPU < 80% | Users cannot feel CPU | Request success rate at the load balancer |
| Average latency | Averages erase the slow tail | p99 latency |
| Uptime of the VM | The VM is up, the app returns 500 | Successful requests ÷ valid requests |
| Ping succeeds | Proves routing, not service | An actual request to a real endpoint |
How to use it#
Define one, concretely#
SLI: proportion of HTTP requests to /api/* returning < 500,
measured at the load balancer
SLO: 99.9% over a rolling 28 days
Budget: 0.1% = ~43 minutes of failed requests per 28 days
Policy: > 50% budget spent → no risky deploys, reliability work prioritised
> 100% spent → feature freeze until back within budgetThe policy line is the one that matters. An SLO with no policy attached changes nothing, and is the most common way this whole practice fails.
Burn rate: how to alert without being paged for nothing#
Alerting on "the SLO was missed" is useless — by then it already happened. Alert on the rate you are consuming budget.
Burn rate 1 = you will spend exactly the whole budget by the end of the window. Burn rate 10 = you will spend it in a tenth of the time.
| Burn rate | Budget gone in | Response |
|---|---|---|
| 1 | 28 days | Nothing. This is the design |
| 2 | 14 days | A ticket |
| 6 | ~5 days | Investigate today |
| 14 | 2 days | Page someone |
Alert on a fast window and a slow window together — typically 5 minutes AND 1 hour, both at a high burn rate.
The short window makes it react quickly; the long window stops a 30-second blip from paging anyone. Either alone is wrong: short-only pages constantly, long-only sleeps through an outage.
إنك تعمل تنبيه على «الـ SLO اتكسر» ده بلا فايدة — عشان لما التنبيه يوصلك، الحكاية خلصت خلاص.
**التنبيه بيبقى على معدّل استهلاك الميزانية.**
الـ burn rate = ١ معناها «هتستهلك الميزانية كلها بالظبط لما النافذة تخلص». والـ burn rate = ١٠ معناها هتستهلكها في عُشر الوقت.
| Burn rate | الميزانية تخلص في | التصرّف |
|---|---|---|
| ١ | ٢٨ يوم | مفيش. ده التصميم نفسه |
| ٢ | ١٤ يوم | تيكت |
| ٦ | ٥ أيام | حقّق النهاردة |
| ١٤ | يومين | اتصل بحد |
اعمل التنبيه على نافذة سريعة و نافذة بطيئة مع بعض — عادةً ٥ دقايق و ساعة، والاتنين على burn rate عالي.
النافذة القصيرة بتخليه يتحرّك بسرعة. والنافذة الطويلة بتمنع إن تعثّر ٣٠ ثانية يصحّي حد من النوم.
وأي واحدة لوحدها غلط: القصيرة لوحدها بتنبّه على أي حاجة فالناس بتبطّل تقرا التنبيهات. والطويلة لوحدها بتنام على انقطاع حقيقي.
What goes wrong#
| Mistake | Why it fails | Instead |
|---|---|---|
| An SLO with no policy | Nothing changes when you miss it | Write the "then what" before the number |
| Setting the SLO at 100% | Removes the ability to deploy, patch or migrate | Pick a number you can afford to miss |
| Measuring on the server | The user is not on your server | Measure at the load balancer, or from the client |
| Averages instead of percentiles | The average hides the users who are leaving | p99, and watch p99.9 |
| SLO = SLA | You lose the safety margin | SLO tighter than the SLA, always |
| Too many SLOs | Twenty targets are zero targets | Two or three per user-facing journey |
| Alerting on budget exhausted | It is already too late | Alert on burn rate, on two windows |
Set 99.99% on a service that realistically achieves 99.9%, and the budget is exhausted every month. The policy then demands a permanent feature freeze, which nobody will honour — so the team learns to ignore the SLO, and you have spent the credibility of the whole practice.
**Set the first SLO slightly below what you already achieve.** Measure for a month, confirm the number is real, then tighten. An SLO you meet is a working control; an SLO you always miss is decoration.
| الغلطة | بتفشل ليه | اعمل إيه |
|---|---|---|
| SLO من غير سياسة | مفيش حاجة بتتغير لما تكسره | اكتب «وبعدين إيه؟» قبل الرقم |
| SLO = ١٠٠٪ | بيلغي قدرتك على النشر والتحديث | اختار رقم تقدر تتحمّل تكسره |
| القياس على السيرفر | اليوزر مش قاعد على سيرفرك | قيس عند الـ LB أو من العميل |
| متوسطات بدل percentiles | المتوسط بيخبّي اليوزرز اللي بيمشوا | p99، وبصّ على p99.9 |
| SLO = SLA | بتخسر هامش الأمان | الـ SLO أضيق من الـ SLA، دايماً |
| SLOs كتير | عشرين هدف = صفر أهداف | اتنين أو تلاتة لكل رحلة مستخدم |
| تنبيه على «الميزانية خلصت» | فات الوقت | تنبيه على الـ burn rate، بنافذتين |
حُط ٩٩.٩٩٪ على سيرفيس واقعياً بيوصل ٩٩.٩٪، والنتيجة إن الميزانية بتخلص كل شهر.
والسياسة بعد كده بتطلب تجميد دائم للفيتشرز — ومحدش هيلتزم بده.
فالفريق بيتعلّم يتجاهل الـ SLO، وإنت خسرت مصداقية الممارسة كلها، مش بس الرقم ده.
حُط أول SLO أقل شوية من اللي إنت أصلاً بتحققه. قيس شهر، اتأكد إن الرقم حقيقي، وبعدين ضيّق.
الـ SLO اللي بتحققه = أداة تحكّم شغالة. والـ SLO اللي بتكسره على طول = ديكور.
Interview corner · الأسئلة اللي بتتسأل#
What is the difference between an SLI, an SLO and an SLA? · إيه الفرق بينهم؟
Measurement, target, contract — in increasing order of consequence.
- SLI is a number: good events ÷ valid events. Missing it costs nothing because it is not a target.
- SLO is your internal target for that number. Missing it triggers an engineering policy you agreed in advance.
- SLA is a contract with a customer, with financial penalties.
The relationship that matters: your SLO must be tighter than your SLA, so you notice and react before the customer's lawyer does. If SLO = SLA you have no margin, and the first breach is a commercial event rather than an engineering one.
قياس، هدف، عقد — مرتّبين بالتكلفة.
- SLI رقم: الناجح ÷ الصحيح. كسره مش بيكلّف حاجة عشان هو مش هدف.
- SLO هدفك الداخلي للرقم ده. كسره بيشغّل سياسة هندسية اتفقت عليها بدري.
- SLA عقد مع عميل، وفيه غرامات مالية.
والعلاقة المهمة: الـ SLO لازم يكون أضيق من الـ SLA، عشان إنت تلاحظ وتتحرّك قبل محامي العميل.
ولو الـ SLO = الـ SLA، يبقى مفيش هامش، وأول كسر بيبقى حدث تجاري مش حدث هندسي.
Your product manager asks for 100% uptime. What do you say? · المدير عايز ١٠٠٪ إتاحة
Do not agree, and do not simply refuse. Reframe with numbers.
- 100% is not purchasable. Your cloud provider will not sign it, your upstream DNS does not have it, and the marginal cost of each nine rises roughly tenfold while the marginal user benefit falls.
- Ask what the user actually notices. Availability of what, measured where? Checkout at the load balancer is a different number from "the whole site from every country".
- Offer a real target with its price. 99.9% is 43 minutes a month and affordable. 99.99% is 4.4 minutes and needs multi-AZ, automated failover and someone on call.
- Point out the budget is a feature. With zero allowed downtime you can never deploy, patch a CVE, or migrate a database — so a 100% target makes the service less safe over time, not more.
This is a maturity test, not a knowledge test. The interviewer wants to know whether you will nod along to an impossible commitment. Push back — with arithmetic, not with attitude.
متوافقش، وفي نفس الوقت متقولش «لأ» وتسكت. أعِد الصياغة بأرقام.
١. الـ ١٠٠٪ مش موجودة للبيع. مزوّد الكلاود مش هيوقّع عليها، والـ DNS اللي فوقك معندهوش ١٠٠٪، وكل «تسعة» بتكلّف عشرة أضعاف اللي قبلها والفايدة اللي اليوزر بيحسها بتقل.
٢. اسأل: اليوزر بيحس بإيه؟ إتاحة إيه بالظبط، ومقيسة فين؟ الـ checkout عند الـ load balancer رقم مختلف تماماً عن «الموقع كله من كل بلد».
٣. اعرض هدف حقيقي ومعاه سعره. ٩٩.٩٪ = ٤٣ دقيقة في الشهر، ومعقولة. ٩٩.٩٩٪ = ٤.٤ دقيقة، ومحتاجة مناطق متعددة وتحويل آلي وحد on-call.
**٤. ووضّح إن الميزانية دي ميزة. لو مسموح بصفر توقف، إنت عمرك ما** هتقدر تعمل ديبلوي، ولا تسدّ ثغرة أمنية، ولا تنقل داتابيز.
فهدف الـ ١٠٠٪ بيخلي الخدمة أقل أماناً مع الوقت، مش أكتر. ودي الجملة اللي بتقلب النقاش.
والسؤال ده اختبار نضوج مش اختبار معلومات. هو عايز يعرف هتهزّ دماغك موافق على التزام مستحيل ولا لأ. اعترض — بحسابات، مش بعصبية.
How would you alert on an SLO without waking people up for nothing?
Alert on burn rate, not on the SLO being missed, and use two windows together.
Missing the SLO is a lagging indicator — by the time it fires, the month is already spent. Burn rate is leading: it says how fast the budget is going.
| Alert on | Result |
|---|---|
| Short window only | Pages on every transient blip; people stop reading alerts |
| Long window only | Sleeps through a real outage for an hour |
| Both, ANDed | Fast and trustworthy |
Then tier by severity: a high burn rate pages, a moderate one opens a ticket, and burn rate 1 does nothing at all — because burn rate 1 is exactly what the budget was designed to absorb.
اعمل التنبيه على الـ burn rate، مش على «الـ SLO اتكسر»، وباستخدام نافذتين مع بعض.
كسر الـ SLO مؤشر متأخر — لما ينطق، الشهر خلص خلاص. أما الـ burn rate مؤشر متقدّم: بيقولك الميزانية بتروح بأي سرعة.
| التنبيه على | النتيجة |
|---|---|
| النافذة القصيرة لوحدها | بينبّه على أي تعثّر، فالناس بتبطّل تقرا |
| النافذة الطويلة لوحدها | بتنام على انقطاع حقيقي ساعة كاملة |
| الاتنين، بشرط "و" | سريع وموثوق |
وبعدين درّج على حسب الخطورة: burn rate عالي بيتصل بحد، ومتوسط بيفتح تيكت، و burn rate = ١ مش بيعمل حاجة خالص — عشان ده بالظبط اللي الميزانية اتعملت عشان تستحمله.
Key takeaways#
- SLI measures, SLO targets, SLA costs money. And your SLO must be tighter than your SLA.
- An SLO with no policy attached changes nothing. Write the "then what" before you argue about the number.
- The error budget exists to settle an argument, not to measure — it makes reliability work a mandate instead of a preference.
- Measure where the user is, and use percentiles, not averages.
- Set the first SLO slightly below what you already achieve. One you always miss teaches the team to ignore it.
- Alert on burn rate over two windows, never on the budget being exhausted.
- 100% is a category error. With no allowed downtime you can never deploy or patch, which makes the service less safe.
- الـ SLI بيقيس، والـ SLO هدف، والـ SLA بيكلّف فلوس. والـ SLO لازم يكون أضيق من الـ SLA.
- SLO من غير سياسة مش بيغيّر حاجة. اكتب «وبعدين إيه؟» قبل ما تتخانقوا على الرقم.
- الميزانية موجودة عشان تحسم خلاف، مش عشان تقيس — بتحوّل شغل الاعتمادية من رغبة لـ تكليف.
- قيس عند اليوزر، واستخدم percentiles مش متوسطات.
- أول SLO خليه أقل شوية من اللي إنت بتحققه أصلاً. اللي بتكسره على طول بيعلّم الفريق يتجاهله.
- نبّه على الـ burn rate بنافذتين، وعمرك ما تنبّه على «الميزانية خلصت».
- الـ ١٠٠٪ غلطة في التفكير نفسه. من غير توقف مسموح، إنت مش هتقدر تنشر ولا تسدّ ثغرة — فالخدمة بتبقى أقل أماناً.
Last updated 2026-09-08