Prepare and test your skills
Prepare and test your skills
Data resiliency in Google Cloud is the ability to keep data durable and available when an entire region fails. The strategy combines synchronous cross-region replication for live serving, asynchronous multi-regional storage for objects, and backups with point-in-time recovery for corruption or deletion. Together these layers protect against both infrastructure outages and data disasters such as accidental deletion.
Cloud Storage (opens in a new tab) provides cross-region durability through dual-region and multi-region bucket locations. Objects in dual-regions and multi-regions are stored in at least two geographically separate areas regardless of storage class, which keeps data available during large-scale disruptions such as natural disasters. Data synchronization between the underlying locations occurs asynchronously. A dual-region uses a pair of regions that you choose, while a multi-region uses data centers selected by Google within that multi-region, including centers that are not listed as standalone regions.
When stronger recovery objectives are required, Cloud Storage offers additional replication controls. Turbo replication replicates data to both regions of a dual-region with a recovery point objective (RPO) of 15 minutes. Cross-bucket replication asynchronously replicates data from a source bucket to a destination bucket in a different location. If you need high confidence that a write has reached another region, use two single-region buckets and either dual-write the object to both buckets or write to one bucket and copy the object to the second bucket with an object rewrite.
| Bucket location | Where data is stored | Choose when |
|---|---|---|
| Single-region | One Google Cloud region | Data at rest must stay in one region or lowest latency to that region is required |
| Dual-region | Two specific regions you select as a pair, with optional Turbo replication | You need survival of a total regional failure plus control over the second region |
| Multi-region | At least two geographically separate areas selected by Google within the multi-region | You want maximum availability and durability without managing the region pair |
Firestore (opens in a new tab) replication automatically maintains synchronous copies across zones and regions so traffic can continue after a zone or regional outage. A regional Firestore database synchronously replicates across at least three zones and provides 99.99% availability, while a multi-region database synchronously replicates across five zones in three regions with two serving regions and one witness region and provides 99.999% availability. Firestore in Datastore mode (opens in a new tab) follows the same model and handles replication without additional configuration or provisioning.
Other managed databases separate regional and multi-regional durability in the same way. Cloud Bigtable (Bigtable) production instances require a minimum of two clusters in unique zones of a region, and Bigtable automatically synchronizes data between clusters to create an independent copy in each zone and allow failover to another cluster in the same instance. BigQuery datasets can be regional or multi-regional, and resilience to a regional disaster requires backup data in another geographic location outside the scope of the source multi-region. Firestore multi-region locations operate in a multi-zone and multi-region replicated configuration that can withstand loss of entire regions without data loss.
Backups and recovery protect against data disasters, while replication protects against infrastructure outages. Backup and DR Service is a centrally managed backup and disaster recovery service that backs up Persistent Disk snapshots from Compute Engine virtual machines (VMs) to Cloud Storage buckets, with monitoring, auditing, reporting for compliance, and insights that help defend against ransomware. For databases, scheduled backups can be taken daily or weekly with a maximum retention period of 14 weeks and can be restored to a new database in the same project at lower restore cost than point-in-time recovery.
Point-in-time recovery (PITR) provides finer-grained recovery for recent changes. When PITR is enabled, you can read data from up to seven days in the past at 1-minute granularity, surgically write back only the needed data, and achieve a recovery time objective (RTO) of 0 with an RPO of 1 minute. For retention beyond 14 weeks, a PITR export can capture the full database from a timestamp within the last seven days and store it in Cloud Storage indefinitely, although recovery from an export is generally more expensive than recovery from a backup. You can also clone a database from the past, from up to seven days ago when PITR is enabled and from up to one hour ago when it is not.
Exam tip: Use scheduled backups for low-cost full restore with 14-week retention, and use PITR for 7-day, 1-minute granular recovery with RTO of 0 and RPO of 1 minute.
Data protection controls in Cloud Storage prevent deletion or overwrite before replication and backup can help. These controls apply at the object or bucket level and support legal, regulatory, and business-critical retention needs:
These controls create a safety window between a delete request and permanent loss. Holds and locks enforce retention even against privileged users, while soft delete and versioning allow recovery of overwritten or deleted objects.
A total regional failure design must account for whether data at rest is allowed to leave the region. If requirements restrict you to a single region, you cannot achieve redundancy across geographic locations with Google Cloud alone. In that case, adopt a multi-cloud or hybrid copy (opens in a new tab) in the same geographic area using interoperable object storage, open-source stores, or transfer services, or use encryption with externally managed keys where permitted so multi-region or dual-region buckets can be used without exposing readable data.
For append-only analytics data, the recovery design can reduce RTO by restoring only new partitions. A BigQuery warehouse update pattern can be reproduced by exporting only changed partitions to columnar formats such as Parquet, ORC, or Avro with compression:
This partitioned approach keeps the warehouse restorable from an alternate location while limiting the amount of data that must be copied after each update cycle.
Traffic management and automated failover is the design for shifting client traffic automatically from a failed primary entry point to healthy backups in other regions. In Google Cloud, global external Application Load Balancer (opens in a new tab) handling is paired with Cloud DNS steering and regional external Application Load Balancer backups to keep applications available during global outages or configuration errors. Multi-region deployment alone is not enough, because capacity, health checking, and operational readiness determine whether backup regions can absorb redirected traffic.
A failover architecture uses a primary load balancer and one or more backup load balancers with different scopes and failure domains. The primary load balancer is the global external Application Load Balancer that handles client traffic during normal operations, while the backup load balancer is a regional external Application Load Balancer that receives traffic when the primary fails health checks. Cloud DNS (opens in a new tab) controls the switch automatically: failover occurs when Cloud DNS detects an outage and routes traffic from the primary to the backups, and failback occurs when Cloud DNS reverses the routing after health checks pass again.
Deploy two or more regional external Application Load Balancers in the regions where traffic should fail over. If all application backends are unavailable, the global load balancer cannot distribute traffic even if it is running, so healthy backends must remain in the failover regions. For applications that serve users globally from multiple regions, use Premium Tier Network Service Tier so traffic from the internet enters the Google network at the point of presence closest to the sender and stays on the high-performance network to the backend. Regional backups are effective because each regional external Application Load Balancer is self-contained within its region and isolated from global load balancer infrastructure, yet both types are based on Envoy proxies and process traffic in similar ways.
The active-passive strategy keeps regional load balancers as idle backups that receive traffic only during a global failure. In steady state, Cloud DNS resolves the application name to the IP address of the global external Application Load Balancer, so traffic flows from client to global load balancer to backend. When the global layer fails, Cloud DNS uses a failover routing policy to send traffic from clients directly to regional load balancers and then to backends, with possible higher latency because edge performance benefits are lost.
Because the regional layer sits idle in steady state, the configuration across global and regional load balancers must be synchronized independently and verified with periodic testing or DNS trickle traffic. Without that testing, configuration drift can leave the backup unable to serve production traffic when failover occurs.
The active-active bypass strategy keeps regional load balancers in the live traffic path behind the global frontend. In steady state, traffic flows sequentially from client to global external Application Load Balancer to regional external Application Load Balancer to backend, where the global layer acts as an edge frontend providing functions such as Cloud CDN edge caching. The global layer forwards requests to the regional load balancers using internet network endpoint groups (NEGs) with fully qualified domain names (FQDNs), and Cloud DNS uses a geolocation routing policy to manage the mapping.
If the global layer has an outage, DNS routing bypasses the global load balancer and sends client traffic directly from clients to regional load balancers to backends. This design reduces global-layer configuration because most application logic lives on the regional load balancers, but edge security and connection settings must be duplicated on both layers, including Cloud Armor policies and TLS certificates. Steady-state traffic continuously exercises the regional load balancers, so reliability is verified by normal use rather than by separate tests.
The two strategies differ in steady-state path, failure behavior, management effort, and how confidence in the backup is earned. The following comparison summarizes when the traffic path changes and what operational work each choice requires.
| Strategy attribute | Active-passive | Active-active |
|---|---|---|
| Steady-state traffic flow | Client to global external Application Load Balancer to backend | Client to global external Application Load Balancer to regional external Application Load Balancer to backend |
| Failure-state traffic flow | Client to regional external Application Load Balancer to backend, with possible higher latency without edge benefits | Client to regional external Application Load Balancer to backend, bypassing the global layer, with possible higher latency without edge benefits |
| Configuration management | Requires synchronizing independent configurations across global and regional load balancers | Global layer needs minimal configuration, but edge security policies and TLS certificates must be duplicated on both layers |
| Reliability verification | Regional load balancer is idle in steady state, so periodic testing or DNS trickle traffic is recommended | Steady-state traffic continuously tests the regional load balancer |
Select active-active when the architecture does not depend on capacity-aware global backend load balancing, and select active-passive when the application explicitly requires the global layer to distribute and spill traffic across regions based on backend capacity.
Exam tip: Prefer active-active bypass unless the application needs global capacity-aware spillover across regions, in which case use active-passive failover.
Capacity and recovery readiness determine whether automated DNS steering succeeds after the traffic shift. Capacity planning must ensure either that sufficient capacity is reserved in all failover regions or that the risks of emergency autoscaling are acceptable, because redirected clients will quickly overload an under-provisioned backup. Load-balancing health checks (opens in a new tab) ensure load balancers send traffic only to responsive backends, even when VMs report RUNNING but application software has crashed, and managed instance groups can add autohealing so unavailable VMs are deleted and replaced.
Business continuity also depends on operational practices:
Recovery environments can be pre-deployed as hot standby or rebuilt quickly with infrastructure as code to balance cost and recovery time. Terraform can deploy the disaster recovery system at recovery time from templates and prebuilt custom images, and a stopped pre-deployed VM avoids compute charges while its static IPs and persistent disks may still incur charges. When infrastructure is not pre-deployed, check resource quotas in the recovery region periodically so the required resources are available when failover occurs.
Define Recovery Objectives and Architectural Patterns is the practice of turning business limits for downtime and data loss into a specific disaster recovery design. A recovery time objective (RTO) (opens in a new tab) sets how long an application can stay offline, while a recovery point objective (RPO) sets how much data the business can afford to lose. Smaller RTO and RPO values require more replication, automation, and standby capacity, so cost and operational complexity rise as the objectives approach zero.
Recovery time objective (RTO) is the maximum acceptable length of time an application can be offline, and recovery point objective (RPO) is the maximum acceptable length of time for which data might be lost. In business terms, RTO answers “How long after a disaster before I’m up and running,” and RPO answers “How much data can I afford to lose.” RTO and RPO are measurable objectives that roll up into a service level objective (SLO), which is part of a larger service level agreement (SLA).
Organizations group applications into criticality tiers (opens in a new tab) so each tier can carry its own RTO and RPO for zone and region outages:
These tiers answer two architecture questions together: whether the application must run in multiple zones in one region or in multiple zones across multiple regions, and which Google Cloud products the application can depend on. Business-critical operations subject to RTO and RPO must depend only on data plane components that continuously process operations. The recovery path must not depend on management plane operations such as a VM-creation API call or an update to an IAM permission.
Cost, complexity, and availability trade off directly against RTO and RPO in disaster recovery design. A smaller RTO and RPO means more frequent backups or continuous replication, more standby infrastructure, and more failover automation, so both cost and administrative overhead rise steeply. High availability (HA) typically applies to regional deployments where managed services provide synchronous replication between zones with zero or near-zero RTO and RPO in an active-active topology.
Disaster recovery (DR) typically applies to multi-region deployments where replication between regions is asynchronous, so failover needs manual or semi-automated steps and careful assessment of RTO and RPO. Even a regional product designed for 99.99% availability can still mean nearly an hour of downtime per year, which forces critical applications to add a multi-region plan. In Google Cloud, requirements are simplified to scope of loss — a zonal outage, a regional outage, or a multi-region outage — rather than every possible hardware cause.
Cold, warm, and hot standby patterns (opens in a new tab) describe how ready the recovery environment is when a disaster strikes. A cold environment is not running until failover and is rebuilt from backups, a warm environment keeps minimal capacity running such as a database replica, and a hot environment runs full capacity in two places at once. Data flows from the primary environment to the recovery environment through periodic backups in cold designs and through continuous replication in warm and hot designs, while user traffic flows from clients through Cloud DNS and load balancing to whichever environment is active.
| Pattern | Recovery readiness | RTO and RPO | Cost and use |
|---|---|---|---|
| Cold standby | No running servers; custom images, templates, and backups in Cloud Storage (opens in a new tab) wait for failover | Largest RTO and RPO because Compute Engine instances must be created, backups restored, and transaction logs applied before DNS switches traffic | Lowest cost; fits batch jobs and Tier 3 departmental apps that tolerate hours of delay |
| Warm standby | Minimal suite always runs, such as a small database instance receiving asynchronous replication over interconnect and VPN | Smaller RTO and RPO because data is already replicated and only app servers need to scale out | Medium cost; fits Tier 2 regional and internal apps as a balance of budget and availability |
| Hot standby | Both environments serve production with load balancing and data replication between them | Lowest RTO and RPO with near-continuous availability and fast promotion of replicas | Highest cost and complexity; fits Tier 1 payments and storefronts that need minimal downtime |
The choice of variation also changes recovery work: standard zonal persistent disks require restoring from snapshots across zones or regions, while regional persistent disks replicate synchronously between zones and multi-regional services such as Spanner and Cloud Storage resist region outages without restoring from backups.
Selecting a pattern from business requirements means matching the tier’s RTO, RPO, and outage scope to the cheapest pattern that still meets them. Choose cold standby when hours of downtime and backup-based data loss are acceptable, choose warm standby when the business needs minutes to an hour of recovery without paying for full duplication, and choose hot standby when only zero or near-zero RTO and RPO will protect revenue or meet regulation.
The design must then prove that the application plus its Google Cloud dependencies still meets the target, using dependencies whose designed availability exceeds the application’s goal. Every plan must be tested regularly in isolation from production, covering backups, data transfer, restore from backups, security controls, access, and network routing.
Exam tip: Smaller RTO and RPO means higher cost, so cold costs least with the largest RTO and RPO, warm sits in the middle, and hot costs most with the smallest RTO and RPO.
Recovery Time Objective (RTO) is the maximum acceptable length of time an application can be offline, while Recovery Point Objective (RPO) is the maximum acceptable length of time for which data might be lost. Smaller RTO and RPO values require more replication, automation, and standby capacity, so cost and operational complexity rise as the objectives approach zero.
Use cold standby when hours of downtime and backup-based data loss are acceptable because it has the largest RTO and RPO at the lowest cost, use warm standby when the business needs minutes to an hour of recovery without paying for full duplication, and use hot standby when only zero or near-zero RTO and RPO will protect revenue or meet regulation. Cold standby rebuilds from backups with no running servers, warm standby keeps minimal capacity running with continuous replication, and hot standby runs full capacity in two places at once.
Use active-active bypass unless the application needs global capacity-aware spillover across regions, in which case use active-passive failover. In active-active bypass steady-state traffic flows from client to global external Application Load Balancer to regional external Application Load Balancer to backend so normal use continuously tests the regional layer, while in active-passive the regional layer sits idle and requires periodic testing or DNS trickle traffic to prevent configuration drift.
Scheduled backups can be taken daily or weekly with a maximum retention period of 14 weeks and can be restored to a new database at lower restore cost than point-in-time recovery. When point-in-time recovery (PITR) is enabled, you can read data from up to seven days in the past at 1-minute granularity, surgically write back only needed data, and achieve a Recovery Time Objective (RTO) of 0 with a Recovery Point Objective (RPO) of 1 minute.
An enterprise runs a mission-critical web application on Google Cloud Compute Engine and needs to implement an automated disaster recovery (DR) and traffic management strategy.
The design must meet the following operational requirements:
Which architecture should the enterprise deploy?
Last updated