Sub topic 3
Error budgets: how much a target allows to fail
Assume you know basic request/response flow, backend components, and simple Python. An SLI is a measured service property, such as successful requests. An SLO is the target for that property over a time window.
Error budgets
An error budget is the amount of failure an SLO permits. For a 99.9% availability SLO over 30 days, the budget is 0.1% of the window:
slo = 0.999
window_minutes = 30 * 24 * 60
error_budget_minutes = window_minutes * (1 - slo)
print(round(error_budget_minutes, 1)) # 43.2The team can spend this budget on failed requests, outages, risky releases, or maintenance. If the budget is nearly exhausted, pause risky changes and focus on reliability. An SLA is a customer-facing contract and may include penalties. An SLO can guide engineering work without being a legal promise.
Fan-out and tail latency amplification
Fan-out occurs when one user request waits for several backend calls. If each call has a 1% chance of being slow, the chance that at least one of 10 independent calls is slow is about 9.6%.
| Parallel calls | Chance of at least one slow call |
|---|---|
| 1 | 1.0% |
| 10 | 9.6% |
| 100 | 63.4% |
Therefore, a fan-out service often needs tighter component targets than its end-to-end target. Caching, fewer dependencies, and returning partial results can reduce this amplification.
Utilization and queueing
As utilization approaches 100%, small bursts cannot be served immediately. Requests wait in queues, so p99 latency rises even when average processing time stays stable. Measure queue depth, wait time, and worker utilization, not just throughput.
Trading latency against throughput
Batching can increase throughput by reducing per-request overhead, but it adds waiting time. Concurrency limits protect a dependency from overload, but they may reject or delay excess work. Backpressure makes a producer slow down when a consumer cannot keep up.
Choose based on the user-visible requirement. For interactive requests, reserve capacity and keep queues short. For asynchronous jobs, batching and controlled queues may provide better throughput.
Validating and revising targets
Measure production SLIs with percentiles and traffic segments. Use load tests that include realistic payloads, cache states, fan-out, failures, and bursts. Compare results with the SLO and budget. Revise the target when user behavior, traffic, or system architecture changes.
Exercise
A 99.9% monthly availability SLO allows about how much downtime in a 30-day month?
Show answer
About 43.2 minutes, calculated as 30 × 24 × 60 × 0.001.