SLO and disaster recovery
Quick answer
A service-level indicator (SLI) measures a service property; a service-level objective (SLO) defines a target over a stated window. Disaster recovery objectives specify tolerable interruption and data loss separately. Examples use small inert synthetic inputs and standard-library Python. No real endpoints. ByteMind execution is unverified.
Calculate request error budget
total=1000good=986allowed=total//100print(allowed, total-good, allowed-(total-good))Expected output (locally tested): 10 14 -4. At a 99% SLO, the observed window overspent by four requests.
How it works
For a request-based SLI, define eligible requests and good outcomes, such as successful responses within 100 ms. The ratio is good divided by eligible; errors and slow responses count once as bad. A 99% SLO allows 1% bad requests in the specified window; use floor(total × 0.01) for an integer budget. With zero eligible requests report no evidence rather than 100%. RTO is the target time to restore service after disruption; RPO is the target maximum data-loss interval relative to the disruption. Compare observed recovery time and checkpoint age separately. A rollback restores a known compatible version; disaster recovery also restores dependencies, state and access. Rehearse restore, validate known-answer requests and document recovery ownership. A target is not a demonstrated guarantee.
Check separate recovery objectives
incident=100backup=88restored=118print(restored-incident<=20, incident-backup<=10)Expected output (locally tested): True False. Restore time passes, but checkpoint age exceeds the RPO.
Common mistakes
Do not remove failed requests from the denominator, confuse RPO with backup runtime, or equate an existing backup with verified restore. Error budget policy must state how measurement windows are handled.
Practice and next steps
Calculate the remaining request error budget, then compare a restore drill with RTO and RPO. Explain what should happen if the backup is too old. Next compare long-run operating costs.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
SLO and disaster recovery — knowledge check
Apply slo and disaster recovery to small examples and debugging scenarios.
What is an SLO?
Which requests count in a latency-and-success SLI?
What is RPO concerned with?
What does zero eligible traffic show?
What makes a restore drill useful?