Google Cloud Tutorial · Operations · Lesson 26 of 27

Reliability and Disaster Recovery

Designing for zone and region failures on Google Cloud: regional services, backups, RTO and RPO, and disaster recovery patterns.

Members can save this page, take notes and track progress. See membership · Sign in

Zone failures: use regional services

Spread across zones by default: regional managed instance groups, regional GKE clusters, Cloud Run (regional), Cloud SQL with high availability, regional or multi-regional storage. Put a load balancer in front and let health checks route around failures.

Region failures: decide RTO and RPO first

  • RTO (recovery time objective): how long you can be down.
  • RPO (recovery point objective): how much data you can lose.
Pattern RTO RPO Cost
Backups restored in another region hours hours (since last backup) low
Warm standby (replica in second region, small capacity) minutes to an hour seconds to minutes medium
Active-active (both regions serve traffic, e.g. Spanner multi-region + global LB) near zero near zero high
Choosing the cheapest DR strategy that meets RTO and RPO (illustrative numbers)Try it yourself
strategies = {
    "backup & restore": {"rto_min": 240, "rpo_min": 60 * 24, "monthly_cost": 300},
    "warm standby": {"rto_min": 30, "rpo_min": 5, "monthly_cost": 2_500},
    "active-active": {"rto_min": 1, "rpo_min": 0, "monthly_cost": 9_000},
}
need = {"rto_min": 60, "rpo_min": 15}
fits = {name: s for name, s in strategies.items()
        if s["rto_min"] <= need["rto_min"] and s["rpo_min"] <= need["rpo_min"]}
cheapest = min(fits, key=lambda n: fits[n]["monthly_cost"])
print("Meets RTO 60 min / RPO 15 min:", ", ".join(fits))
print("Cheapest that meets it:", cheapest)

Output

Meets RTO 60 min / RPO 15 min: warm standby, active-active
Cheapest that meets it: warm standby

Make it real

Use cross-region backups (Backup and DR Service, Cloud SQL cross-region replicas, dual-region buckets), keep infrastructure in Terraform so a region can be rebuilt, and test failover regularly; an untested plan is a guess.

Test yourself

What does RPO measure?

  1. How long recovery takes
  2. How much data you can afford to lose
  3. How many regions you use
  4. How often you deploy
Show answer

Answer: How much data you can afford to lose

RPO is the acceptable data loss window; RTO is the acceptable downtime.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake