Prepare and test your skills

Prepare and test your skills

Cross-region replication for managed databases keeps data available for global reads and regional failover. Cloud SQL (opens in a new tab) uses a regional primary with a cross-region read replica that is promoted manually, while Cloud Spanner and other managed multi-regional services distribute data across regions automatically. The choice depends on whether the team wants to manage replica promotion or have Google handle availability as part of the service.
Disaster recovery (opens in a new tab) for regional outages requires planning beyond zonal protection, because a regional service becomes unavailable if its primary region fails. Understanding where the primary data lives, how replication flows to a secondary region, and who performs failover determines the recovery time objective (RTO) and recovery point objective (RPO).
Cloud SQL high availability (HA) protects a database against a zonal failure but not against a regional failure. The HA architecture places a primary instance and a standby instance in two separate zones within one primary region, and the two instances stay synchronized through regional persistent disks. The primary and standby instances share the same regional disk, so their states are identical.
If the entire primary region becomes unavailable, the Cloud SQL database also becomes unavailable because Cloud SQL is a regional service. HA failover is automatic to the standby in the same region, which is different from cross-region disaster recovery that requires manual action.
A Cloud SQL cross-region read replica is a Cloud SQL instance in a secondary region that synchronizes with the primary instance by asynchronous replication. Data flows from the primary instance in the primary region to the replica in the secondary region, and applications can use the replica for read access closer to users in that region. Because replication is asynchronous, the replica can lag behind the primary, so the RPO after a failover is likely non-zero.
Operators check the Lag Bytes value in the Cloud SQL monitoring dashboard to estimate how much recent write data has not yet replicated. That lag represents the data that could be lost if the primary region fails before replication catches up.
The Cloud SQL disaster recovery (DR) process restores processing in a secondary region by promoting a cross-region read replica to become the new primary instance. Promotion is manual and intentional, which is different from HA where the standby automatically becomes primary after a zonal failure. The DR process follows an ordered sequence:
A process flow showing async replication from R1 primary to R2 replica, followed by four ordered DR steps: R1 failure, manual disaster decision, replica promotion, and client redirection.
There are two variants for what happens next. The database can remain primary in the secondary region permanently, or it can fall back to the original primary region after recovery when latency or region-specific resources require it. Export, import, backup, and restore can also recreate a database in another region, but that approach takes longer, especially for large databases.
Exam tip: Promoting a cross-region read replica is manual, while HA failover to the standby instance in the same region is automatic.
Regional migration and disaster recovery both use cross-region replication followed by promotion, but they differ in planning and urgency. Regional migration is a planned move where a replica is created in another region, replication is allowed to catch up, the replica is promoted, and clients are pointed to the new instance with minimal downtime. Disaster recovery is an unplanned failover used when the primary region is unavailable for an extended period and operations must continue in the replica region.
Three business situations warrant a cross-region failover configuration:
In Cloud SQL Enterprise Plus edition, advanced DR allows one cross-region read replica to be designated as the disaster recovery replica. A replica failover replaces the primary instance with the designated DR replica, and the old primary becomes a replica of the promoted instance. A switchover can then reverse the roles again with zero data loss to return to the original state.
Managed multi-regional services provide redundancy without configuring and promoting a cross-region replica. Cloud Spanner, Cloud Storage, Datastore, and Firestore are managed multi-regional resources that distribute data for high availability and disaster recovery capable applications. For zonal or regional resources, redundancy requires extra work, such as snapshotting data to a multi-regional resource or managing replication to other regions.
For compute, the application must be brought up manually or automatically in another region and pointed at the surviving data copy. The choice between replica-based and managed multi-regional redundancy splits by operational control:
| Option | How redundancy works | Failover handling |
|---|---|---|
| Cloud SQL with cross-region replica | Primary and standby share a regional disk in the primary region; data replicates asynchronously to a replica in the secondary region | Manual promotion of the replica to primary, then reconfigure clients |
| Cloud Spanner and other managed multi-regional services | Google manages data distribution across regions as part of the service | Service remains available across regions without customer replica promotion |
Redundancy and data residency in analytical workloads control where analytic data lives and how it survives outages. In Google Cloud, BigQuery (opens in a new tab) stores warehouse data in a chosen dataset location, while Cloud Storage, Pub/Sub, and Cloud Logging support ingestion, staging, and audit data around it. Redundancy protects against zone or region failures through replication and copies, while residency keeps data stored or replicated only within the regions you specify.
BigQuery dataset location is the setting that determines residency for warehouse data. A regional location is a single geographic place, such as Iowa (us-central1), and a multi-region location is a large geographic area, such as the United States (US) or Europe (EU), that contains two or more geographic places. Data that you load into BigQuery is stored synchronously in two zones within the region that you specify, so a zonal outage does not cause data loss.
BigQuery helps meet data residency requirements because data is stored within the region that you specify. Choosing a regional or multi-region location therefore controls both where queries run and where the stored bytes remain.
Exam tip: A BigQuery multi-region location does not provide cross-region replication or regional redundancy — data is still stored in a single region within that geographic location.
Replication is how Google Cloud products create redundant copies across zones or regions. With synchronous replication, the product returns success only after it has written data to multiple locations, so no committed data is lost if one location fails. With asynchronous replication, the product returns success after writing to a single location and then replicates to additional locations afterward, which gives lower latency and higher throughput but risks losing recent writes if the first location fails before replication completes.
Multi-region products that use synchronous replication can add tens or hundreds of milliseconds of latency. BigQuery uses synchronous storage across two zones in its region, while dual-region and multi-region Cloud Storage buckets use asynchronous replication across regions for higher availability.
BigQuery cross-region replication is the continuous copying of database changes to a secondary database in a different location. Cross-region replication in BigQuery creates a synchronized, read-only copy in a secondary region that is close to data consumers, which enables collocated joins and avoids cross-regional traffic and cost. Cross-region replication is not intended as a disaster recovery plan for total-region outage scenarios; for resilience against regional disasters, use BigQuery managed disaster recovery.
Replication also copies corruption, so if human error corrupts data, the corrupted data is copied to the replica and point-in-time backups such as snapshots are the better recovery choice. Multi-region storage is the simplest and most cost-effective way to keep warehouse data available if a disaster occurs. If multi-region storage is not available in your region but you can use a different region, use the BigQuery Data Transfer Service to copy your dataset to that different region.
If you can use only one region, back up BigQuery tables with BigQuery exports to Cloud Storage on a schedule set by Cloud Scheduler or Managed Service for Apache Airflow, using formats such as Avro with SNAPPY compression or JSON with GZIP compression. If encryption can mitigate locality restrictions, you can manage your own keys with Cloud Key Management Service (Cloud KMS) and BigQuery. The two approaches differ in frequency, location, and purpose:
| Method | Frequency | Storage location | Use when |
|---|---|---|---|
| Backup with snapshots or Cloud Storage export | One-time or recurrent | Same as source table data | Restore original data beyond the time travel period or recover from corruption |
| Cross-region replication | Continuous | Remote region | Create a read-only replica near consumers or perform a one-time migration between regions |
Backup storage incurs snapshot charges for data changes in the snapshot only or standard storage charges for exports, while replication incurs charges for storing data in the replica plus data replication charges. If corruption is caught within 7 days, you can also query the table to a point in time before the corruption by using snapshot decorators.
Cloud Storage bucket location type controls both redundancy and residency for staged and exported analytic data. When you create a bucket, you select regional, dual-region, or multi-region location type based on availability and regulatory needs. Data in regional buckets is replicated synchronously across multiple zones within a region, with redundancy across at least two zones, while data in dual-region or multi-region buckets is replicated asynchronously across regions for protection against region outages.
Pub/Sub and Cloud Logging keep pipeline and audit data within required boundaries. By default Pub/Sub encrypts messages at rest and in transit, and you can configure message storage policies to ensure that message data is stored in specific locations. Cloud Logging records Admin Activity audit logs by default and Data Access audit logs for BigQuery, and you can configure Cloud Logging to store log data in the region that you specify. Together, message storage policies and regionalized logs let ingestion events and audit trails follow the same residency rules as the warehouse and lake data.
Locality requirements (opens in a new tab) decide whether an analytics platform can use multiple regions for disaster recovery. A platform is locality-restricted if the application must be deployed to a specific region or data at rest is restricted to a specific region. If encryption can mitigate the data-at-rest requirement, you can use multi-regional and dual-regional services with Cloud External Key Manager and Cloud KMS and then follow standard high availability and disaster recovery techniques.
If encryption cannot mitigate the requirement, you must use custom solutions or partner offerings for disaster recovery planning. Data warehouse characteristics shape how long recovery takes and what to back up:
These factors explain why append-only designs, controlled update paths, and scheduled exports work well when a warehouse must stay in one region for residency while still meeting recovery goals.
Multi-regional and dual-regional configurations in Cloud Storage (opens in a new tab) are bucket location types that keep data redundant across two separate geographic places. Both types use a single bucket with an active-active design, so applications keep using the same storage path even during a regional outage. This design is intended to provide 99.99% availability and a recovery time objective (RTO) of zero for data that has finished replicating across regions.
Availability and durability (opens in a new tab) describe two different protections in Cloud Storage. Availability is the ability to access data immediately upon request, and its monthly level depends on the storage class and the bucket location type. Durability is long-term protection to ensure data remains intact and uncorrupted, and Cloud Storage is designed for at least 99.999999999% annual durability regardless of storage class and location type.
Cloud Storage reaches that durability with erasure coding and redundant storage of data pieces across multiple devices. Writes are confirmed as successful only after data has been redundantly stored, and checksums are stored and regularly revalidated to verify integrity of data at rest and to detect corruption in transit. If corruption is found, corrections are automatically made using the redundant data.
Bucket location type determines how widely Cloud Storage spreads redundant copies of data. A regional bucket stores data redundantly in at least two availability zones in the selected region and is designed to tolerate the loss of any one zone. Object writes to a regional bucket are confirmed only after data is stored across at least two different zones, so a single zone outage does not require a change in storage path.
Dual-region and multi-region buckets store data redundantly in at least two separate geographic places, so they remain available during a region-wide outage with no need to change storage paths. Writes to these buckets are first confirmed after data is stored across at least two zones in one initial region, the same as a regional bucket, and data is then asynchronously replicated to provide redundancy across regions. Strong consistency ensures that stale versions are not served and that later overwrites are not reverted if a region becomes unavailable before replication finishes and later returns.
Dual-region buckets and multi-region buckets differ mainly in who chooses the exact places and in cost. A dual-region bucket stores objects in the two specific regions selected at creation, while a multi-region bucket lets Cloud Storage choose the data centers as needed within the geographic boundary of the multi-region. Data centers in a multi-region are separated by at least 100 miles, which provides redundancy across regions at a lower storage cost than dual-regions.
| Location type | How locations are chosen | Separation and cost |
|---|---|---|
| Dual-region | Customer selects the specific pair of regions | Data is stored in two chosen regions; higher storage cost than multi-region |
| Multi-region | Cloud Storage selects data centers as needed within the multi-region boundary | Data centers are separated by at least 100 miles; lower storage cost than dual-region |
Choose a dual-region bucket when specific region pairs matter for distance, compliance, or application placement. Choose a multi-region bucket when Google-managed placement within a broad geography is acceptable and lower storage cost is important. To achieve redundancy between a region pairing that is not available as a dual-region, create a separate bucket in each region and keep the buckets in sync with Storage Transfer Service event-driven transfers or cross-bucket replication.
Replication timing determines how much newly written data is protected if a region fails. Dual-region and multi-region buckets automatically serve objects from an available region, so temporary regional failures are normally invisible and the RTO is designed to be zero. Any data that has not finished replicating across regions before a region becomes unavailable stays inaccessible until that region returns, and data could be lost in the very unlikely case of physical destruction of the region.
Default replication is designed to provide redundancy across regions for 99.9% of newly written objects within a target of one hour and 100% within a target of 12 hours. Newly written objects include uploads, rewrites, copies, and compositions, and most objects finish replication within minutes even without premium features. Turbo replication is a premium offering for dual-region buckets that is designed to replicate 100% of newly written objects to both regions within a 15-minute recovery point objective (RPO), regardless of object size, which reduces data-loss exposure and helps support uninterrupted service after a regional outage.
Exam tip: Turbo replication applies only to dual-region buckets with a 15-minute RPO, while default cross-region replication targets 99.9% in one hour and 100% in 12 hours.
Cloud SQL high availability (HA) protects against zonal failure with automatic failover to a standby in the same region, while cross-region disaster recovery (DR) requires manual promotion of an asynchronous cross-region read replica in a secondary region. In high availability (HA), the primary and standby instances are in two zones of one region and share the same regional disk, so the database becomes unavailable if the entire primary region fails. In disaster recovery (DR), the replica synchronizes asynchronously from the primary and clients are reconfigured to the promoted instance after the operations team decides failover is required.
Turbo replication should be used for Cloud Storage dual-region buckets when newly written objects need a 15-minute recovery point objective (RPO). It is a premium offering designed to replicate 100 percent of newly written objects to both regions within 15 minutes, while default replication targets 99.9 percent within one hour and 100 percent within 12 hours.
No, a BigQuery multi-region location does not provide cross-region replication or regional redundancy because data is still stored in a single region within that geographic location. Data loaded into BigQuery is stored synchronously in two zones within the specified region, so a zonal outage does not cause data loss but a regional outage is not covered by the location choice alone.
Your company is designing an analytical data warehouse using BigQuery to process sensitive customer telemetry. The architecture must satisfy two strict architectural requirements:
Which dataset configuration should you choose to satisfy these requirements?
Create the BigQuery dataset in the default US multi-region and apply regional network tags to restrict client queries to European IP addresses
Create the BigQuery dataset in the europe-west3 (Frankfurt) region and configure scheduled exports to a US multi-region Cloud Storage bucket
Create the BigQuery dataset in the europe-west1 (Belgium) region and rely on default single-zone disk snapshotting for redundancy
Create the BigQuery dataset configured with the EU multi-region location
Last updated