Prepare and test your skills
Prepare and test your skills
Replication strategies in Google Cloud copy data to extra locations so one zone or region failure does not cause loss or downtime. Cloud Storage (opens in a new tab) uses bucket location types and asynchronous copying to balance durability, availability, and recovery speed, while managed databases such as Cloud SQL simplify creating a replica in a new region. The choice affects how fast the system recovers and how much data could be at risk during an outage.
Availability and durability in Cloud Storage are two different protections. Availability is the ability to access data immediately when requested, and monthly availability depends on both the storage class and the location type of the bucket. Durability is long-term protection that keeps data intact and uncorrupted, and Cloud Storage is designed for at least 99.999999999% (11 9's) annual durability for all storage classes and location types.
Cloud Storage achieves durability by using erasure coding and storing pieces of data redundantly across multiple devices. A write is confirmed as successful only after the data has been stored redundantly, and checksums are stored and regularly rechecked to detect corruption in transit and at rest. If corruption is found, Cloud Storage automatically repairs it using the redundant data.
Bucket location type in Cloud Storage controls where redundant copies live and what kind of outage the bucket can survive. Regional buckets store data redundantly in at least two availability zones in one selected region and are designed to tolerate the loss of any one zone. Dual-region and multi-region buckets store data redundantly in at least two separate geographic places and stay available during a region-wide outage with no change to storage paths.
The three types differ in control, placement, and cost:
| Location type | Redundancy scope | Outage tolerance and notes |
|---|---|---|
| Regional bucket | At least two availability zones in one region | Remains available during a zone outage; writes confirmed after storage across at least two zones |
| Dual-region bucket | Two specific regions chosen by the user | Remains available during a region outage with recovery time objective (RTO) of zero; supports turbo replication |
| Multi-region bucket | Data centers chosen by Cloud Storage within the multi-region boundary, separated by at least 100 miles | Remains available during a region outage with RTO of zero; cross-region redundancy at lower storage cost than dual-region |
Locally redundant data, such as data in a zonal bucket, still provides 11 9's durability against hardware failures like host, rack, or drive failures. Because it is not redundant across zones, it can become unavailable or be permanently lost during a zone failure and is best for data that can be replaced or rebuilt.
Default cross-region replication in Cloud Storage is the asynchronous process that copies newly written objects to the second geographic location for dual-region and multi-region buckets. A write to a dual-region or multi-region bucket is first confirmed after redundant storage in one initial region across at least two zones, the same as a regional write. Data then flows asynchronously from that initial region to the other region to complete protection across regions.
Cloud Storage uses an active-active design based on a single bucket, so there is no primary and secondary bucket and no manual failover. Cloud Storage tracks the current state of the bucket and transparently serves objects from an available region, which is why dual-region and multi-region buckets are designed for an RTO of zero. Strong consistency ensures that stale versions are not served if a region is unavailable before replication finishes, and later overwrites are not reverted when the region returns. Default replication targets redundancy across regions for 99.9% of newly written objects within one hour and 100% within 12 hours, where new writes include uploads, rewrites, copies, and compositions.
Turbo replication in Cloud Storage is a premium option for dual-region buckets that makes cross-region copying faster and more predictable. When enabled, turbo replication is designed to replicate 100% of newly written objects to both regions in the dual-region within a recovery point objective (RPO) of 15 minutes, regardless of object size. Faster replication lowers data-loss exposure and helps support uninterrupted service after a regional outage, although most objects finish in minutes even with default replication.
Turbo replication has specific limits that control when it applies:
Exam tip: Default replication targets 99.9% of new objects within one hour and 100% within 12 hours, while turbo replication targets 100% within a 15-minute RPO and works only for dual-region buckets.
Cross-bucket replication in Cloud Storage asynchronously copies data from a source bucket to a destination bucket in a different location. The destination bucket is an independent bucket, so this option covers needs not met by built-in dual-region or multi-region locations. To gain redundancy between a region pair that is not offered as a dual-region, a team can create a separate bucket for each region and keep them in sync with cross-bucket replication or with event-driven transfers from Storage Transfer Service.
Replication scenarios compare when copying data across zones or regions is worth the extra cost and complexity. Cloud Storage (opens in a new tab) replication improves availability during outages and protects durability against zone or region loss, but it adds storage cost, asynchronous delay, and management work. The right choice depends on geographic spread, how critical the data is, and the recovery time and recovery point goals.
Availability and durability in Cloud Storage protect against different problems. Availability means data can be read immediately on request, while durability means data stays intact and uncorrupted over time. Cloud Storage is designed for at least 99.999999999% (11 9's) annual durability for every storage class and location type.
To reach that durability, Cloud Storage uses erasure coding to store data pieces redundantly across multiple devices, confirms a write only after redundant storage, and stores checksums that are regularly revalidated. These checks catch corruption both while data moves and while it rests, so damaged pieces can be rebuilt from the redundant copies.
Zonal and regional storage keeps data close to users in one area but limits protection against larger failures. Locally redundant data, such as data in a zonal bucket, provides 11 9's durability against hardware failures like host, rack, or drive failures, but it is not redundant across zones and can become unavailable or be lost during a zone failure. Regional buckets store data redundantly in at least two availability zones in the selected region, confirm writes only after storage across at least two zones, and are designed to tolerate loss of any one zone. Choose zonal or regional storage when data can be replaced or rebuilt, when low latency in one region matters more than surviving a region-wide outage, and when lower cost matters more than geographic redundancy.
Dual-region buckets and multi-region buckets provide active-active redundancy across regions from a single bucket with no manual failover. Cloud Storage always understands the current state of the bucket and transparently serves objects from an available region, so both types are designed for an RTO of zero and short regional failures are normally invisible to users. Unlike a traditional active-passive model with a primary and secondary location, users do not copy data from one bucket to another or change storage paths during an outage.
A decision tree branching on region-outage survival, region-pair availability, cost versus control, and RPO needs to pick Regional, Dual-region with default or turbo replication, Multi-region, or Cross-bucket replication.
The location options differ in control, placement, and cost:
| Option | Where redundant copies live | Behavior during outage |
|---|---|---|
| Regional bucket | At least two availability zones in one selected region | Remains available during a zone outage, but not during loss of the whole region |
| Dual-region bucket | Two specific regions selected by the user | Remains available during a region-wide outage with no path change; supports turbo replication |
| Multi-region bucket | Data centers chosen by Cloud Storage within the multi-region boundary, separated by at least 100 miles | Remains available during a region-wide outage with no path change at lower storage cost than dual-region |
Choose dual-region storage when control over the exact region pair and the fastest cross-region replication matter most. Choose multi-region storage when broad geographic redundancy at lower storage cost matters more than choosing the exact regions.
Cross-region redundancy in Cloud Storage is asynchronous, which creates a tradeoff between fast writes and complete geographic protection. Writes to a dual-region or multi-region bucket are confirmed after redundant storage in one initial region across at least two zones, and data is then replicated to the other region in the background. Default replication is designed to provide redundancy for 99.9% of newly written objects within one hour and 100% within 12 hours, where newly written objects include uploads, rewrites, copies, and compositions.
Turbo replication is a premium option for dual-region buckets that provides faster and more predictable replication for newly written data. When enabled, turbo replication is designed to replicate 100% of newly written objects to both regions within an RPO of 15 minutes, regardless of object size, which reduces data-loss exposure and helps support service after a regional outage. Turbo replication has important limits: it is only available for dual-regions, it cannot be managed through the XML API, it can take up to 10 seconds to apply to new writes after it is enabled, and writes that began before it was enabled continue at the default rate.
Exam tip: RTO of zero does not mean every new object survives a regional outage. Any data that has not finished replicating before a region becomes unavailable is inaccessible until that region returns, and it could be lost if the region is physically destroyed.
Cross-bucket replication asynchronously copies data from a source bucket to a destination bucket in a different location when built-in pairings do not meet the need. To gain redundancy between a region pair not offered as a dual-region, create a separate bucket for each region and keep them in sync with cross-bucket replication or with event-driven transfers from Storage Transfer Service. This approach adds flexibility for custom geography, compliance, or migration goals, but it requires managing two independent buckets instead of one active-active bucket. Replication is most valuable when downtime or loss carries high business impact, and less valuable when data is replaceable or recovery within one region is enough.
Replication purposes in Google Cloud separate performance work from reliability work, even though both use synchronized copies. Cloud Storage (opens in a new tab) bucket replication and Cloud SQL instance replication can spread read traffic to lower latency or keep a standby copy ready to limit downtime and data loss. Choosing the wrong purpose leads to the wrong design, such as using a read replica when automatic failover is needed.
A Cloud SQL for MySQL read replica is a copy of a primary instance designed to serve read queries and scale read performance. Data flows from the primary instance to the replica in order: the primary records data-changing statements in its binary log, the replica receives those statements into its relay log, and then the replica applies them to stay in sync. Binary logging is enabled by default in Cloud SQL for MySQL to enable recovery and read-replica deployment. Use a read replica when the application needs lower query latency or needs to offload reads from the primary, not when the goal is automatic failover.
Exam tip: Cloud SQL for MySQL read replicas are not intended to serve as standby instances for disaster recovery (DR) scenarios; use a high-availability (HA) configuration for automatic failover.
A high-availability (HA) configuration is a replication setup designed for reliability within a region, using a standby instance already in sync with the primary instance. If the primary is unresponsive for approximately 60 seconds, the HA standby instance will be available upon reconnection, which limits downtime from zonal failure or instance failure. Adding HA to an existing primary instance might require an instance reboot, and HA can be configured using the Google Cloud console or the gcloud CLI. Choose HA when the requirement is continuous availability and fast recovery without manual promotion of a replica.
A cross-region replica is a replication setup designed for disaster recovery across geographically separate locations. Cloud SQL can use an HA configuration and cross-region replicas together to maximize uptime during zonal or regional failure, because HA protects against loss of the primary in one zone while a cross-region copy protects against loss of an entire region. For Cloud SQL Enterprise Plus edition, advanced disaster recovery (DR) simplifies recovery and fallback with zero data loss after a cross-regional failover. Choose cross-region replication when the business objective is survival of regional outages, and choose backups or exports to Cloud Storage as a complement when the goal is point-in-time recovery from deletion or corruption.
The options differ by primary goal and effect:
| Replication option | Primary goal | How it reduces risk or latency |
|---|---|---|
| Read replica | Read scalability | Offloads read queries from the primary to reduce load and query latency; does not provide automatic failover |
| HA standby | High availability | Maintains an in-sync standby that becomes available after about 60 seconds of primary unresponsiveness |
| Cross-region replica | Disaster recovery | Maintains a copy in another region to preserve availability through regional failure, with zero data loss on failover in Enterprise Plus advanced DR |
Availability in Cloud Storage is the ability to access data immediately when requested, while durability is long-term protection that keeps data intact and uncorrupted. Cloud Storage is designed for at least 99.999999999% annual durability for all storage classes and location types by using erasure coding, confirming a write only after redundant storage, and storing checksums that are regularly rechecked to detect corruption and automatically repair it using the redundant data.
Regional buckets store data redundantly in at least two availability zones in one selected region and remain available during a zone outage but not during loss of the whole region, while dual-region and multi-region buckets use a single active-active bucket that remains available during a region-wide outage with a recovery time objective (RTO) of zero and no path change. Choose dual-region storage when control over the exact region pair and the fastest cross-region replication matter most, and choose multi-region storage when broad geographic redundancy at lower storage cost matters more than choosing the exact regions. Choose zonal or regional storage when data can be replaced or rebuilt, when low latency in one region matters more than surviving a region-wide outage, and when lower cost matters more than geographic redundancy.
Default cross-region replication asynchronously copies newly written objects to the second geographic location and targets redundancy across regions for 99.9% of newly written objects within one hour and 100% within 12 hours. Turbo replication is a premium option only for dual-region buckets that is designed to replicate 100% of newly written objects to both regions within a recovery point objective (RPO) of 15 minutes regardless of object size, which lowers data-loss exposure and helps support service after a regional outage.
Use a Cloud SQL for MySQL read replica when the application needs lower query latency or needs to offload reads from the primary, because it serves read queries through binary log to relay log replication and does not provide automatic failover. Choose a high-availability (HA) standby when the requirement is continuous availability within a region because it stays in sync and becomes available after about 60 seconds of primary unresponsiveness, and choose a cross-region replica when the objective is survival of regional outages for disaster recovery (DR).
A retail company hosts its relational database on a single Cloud SQL instance. During peak shopping events, write operations succeed normally, but customer-facing product searches and analytical reports experience significant query latency because they compete for compute resources on the primary instance.
Which replication configuration should the database administrator implement to reduce query latency for these read-heavy workloads?
Configure Cloud SQL read replicas to offload read-only and reporting queries from the primary instance.
Export database tables periodically to a Cloud Storage dual-region bucket.
Enable High Availability (HA) on the Cloud SQL instance to provision a synchronous standby instance in a different zone.
Enable automated daily backups with point-in-time recovery (PITR) on the primary Cloud SQL instance.
Last updated