Part 6 of 8 · 2 min read
RTO and RPO
Two numbers that decide the design.
These two terms are standard in the industry, though not used in the books above.
RTO and RPO
The recovery time objective (RTO) is the longest the business accepts to be down. The recovery point objective (RPO) is the most data, measured in time, the business accepts to lose.
Example: RTO 1 hour and RPO 5 minutes: back in service within an hour, with at most the last 5 minutes of data lost.
Each design offers a different pair. The table gives typical ranges, made up to show the idea.
| Design | Typical RTO | Typical RPO | Cost |
|---|---|---|---|
| Backup and restore from another region | Hours to a day | Up to the time since the last backup | Lowest |
| Standby that is started on demand (small copy kept running) | Tens of minutes | Seconds to minutes with async replication | Low to medium |
| Warm standby at reduced size | Minutes | Seconds to minutes | Medium |
| Active-active in two or more regions | Seconds to minutes | Near zero with sync replication, seconds with async | Highest |
The link with replication (Level 4) is exact. With asynchronous replication, the data not yet shipped when the leader fails is lost, and DDIA says so: the newest writes can vanish when the leader is lost. That lag is your RPO. With synchronous replication to a second site, the RPO can be zero, at the price of waiting for that site on every write.
A worked example (made up). A database makes a snapshot every 6 hours and ships the log every minute to another region. RPO is about 1 minute. To restore, the team loads the last snapshot (40 minutes for 2 TB), replays up to 6 hours of log (30 minutes) and moves traffic (10 minutes). RTO is about 80 minutes. If the business needs an RTO of 15 minutes, the design must change: keep a standby that already holds the data, so only traffic needs to move.
Choose from the business. Cost rises sharply as RTO and RPO fall. Ask the business what an hour of downtime costs and what a minute of lost orders costs, and match the design to that. Not every part needs the same pair. A reporting database can have an RTO of a day. A payment ledger cannot.
Check yourself: 1. Which number does asynchronous replication lag decide, RTO or RPO? 2. In the example, which step dominates the RTO? 3. Why should different parts have different objectives?