Topic 14.2
Disaster Recovery
In one line
RPO, RTO, backup and restore at the REGION level — the plan for when the whole datacenter dies.
Think of it like this
Keeping a spare house key with a neighbour in case your own copy is lost in a fire. It costs a little extra effort now, so you're not completely locked out later.
Key ideas
- 01
RTO (Recovery Time Objective): how fast you must be back — e.g. 4h.
- 02
RPO (Recovery Point Objective): how much data you may lose — e.g. 15 min.
- 03
Backup: nightly snapshots + WAL shipping → RPO up to minutes; restore drills are the real test.
- 04
DR strategies ladder: backup-restore (cheap, slow) → pilot light (minimal running, scale up) → warm standby (replica region, small) → multi-site active (fastest, priciest).
- 05
Region failure handling: DNS/global-LB cutover to the DR region; state replication (async, so RPO>0) decides the loss.
- 06
The honest line: 'RTO 4h, RPO 15min, will-drill quarterly' — numbers beat vibes.
- 07
Interview: always be able to say your RPO/RTO and where the trade got set.
Java / Spring map
- →
Spring config per-region; automation for restore (Terraform + scheduled restore tests).
Code & diagrams
Explain without notes
Region A is gone. Walk the cutover to region B: what DNS/LB do, what data is lost (RPO), how fast (RTO).
Practice
Write DR plan: RPO/RTO, backup cadence, restore drill checklist, cutover steps.
Trade-offs
- ↔
Every 9 of availability and every minute of RPO is a line on the infrastructure bill.
Run it in production
You've designed it. Now build, operate, and break the same idea hands-on in the DevOps courses:
Completion checklist
My DR answers always carry explicit RPO/RTO and a drill story.