AI Hints
Home›System Design Tutorial›Surviving Failure
System Design · Lesson 84 of 120

Disaster Recovery

RPO and RTO.

⏱ 2 min read▶ Video at 1:40:57🎓 Free
Watch this lesson in the System Design courseWatch on YouTube ↗Full System Design course

Sometimes a whole data centre is lost. A fire, a flood, or a mistake that deletes a database. Disaster recovery is the plan for getting back. Two numbers define it.

Disaster Recovery
From the video: Disaster Recovery
  • A whole data centre lost
  • Plan to get back
  • Two numbers

RPO and RTO

RPO, the recovery point objective, is how much data you can afford to lose, measured in time. An RPO of one hour means losing at most the last hour of orders. RTO, the recovery time objective, is how long you can afford to be down. An RTO of fifteen minutes means you must be back within fifteen minutes.

keyvalue
RPOhow much data you can lose
RPO = 1 hourlose at most an hour
RTOhow long you can be down
RTO = 15 minback within 15 minutes

Strategies and costs

Smaller numbers cost more. Nightly backups give an RPO of a day, and a recovery of hours. Continuous replication to another region gives an RPO of seconds. A warm standby region gives an RTO of minutes. And running fully in two regions at once gives near zero for both, at roughly double the cost.

StrategyRPORTOCost
Nightly backups~1 dayhourslow
Continuous replicationseconds~1 hourmedium
Warm standby regionsecondsminuteshigh
Active in two regions~0~0highest

Summary

RPO is how much data you can lose, and RTO is how long you can be down. Lower numbers cost more. And always test your backups by restoring them. Next, knowing whether your system is working.

Key takeaways
  • RPO: data loss
  • RTO: downtime
  • Test your restores
Next up: Monitoring and Metrics — knowing it works