Cloud storage replication: design for lag and deletion behavior
Cloud storage replication automatically propagates object changes from one location to another to improve availability, geographic separation, sharing, or recovery. Replication is often asynchronous, so a successful write at the source may not yet exist at the destination. Replication alone is not a backup or a complete disaster-recovery plan. Choose a method based on recovery point objective (RPO), when the destination can be read or written, and how deletes and existing data are handled.
Cloud storage replication automatically propagates object changes from one location to another to improve availability, geographic separation, sharing, or recovery. Replication is often asynchronous, so a successful write at the source may not yet exist at the destination. Replication alone is not a backup or a complete disaster-recovery plan. Choose a method based on recovery point objective (RPO), when the destination can be read or written, and how deletes and existing data are handled.
What does replication copy, and where?
A replication rule typically defines source, destination, object filters, and destination settings such as encryption, ownership, or storage class. Providers may offer both redundancy across zones/regions within one bucket and copying to an independent destination bucket. The first can route service requests around an outage; the second can create a copy with separate access, encryption, or retention settings.
AWS S3 replication generally covers objects created after configuration; existing objects may need a separate batch job. Google Cloud cross-bucket replication asynchronously copies new and updated objects, but does not automatically copy existing ones. Azure GRS/GZRS copies synchronously within the primary region using LRS/ZRS, then asynchronously to the secondary region. Check each service’s current scope and supported features. (AWS replication behavior, Google Cloud availability and durability, Azure redundancy)
How does asynchronous lag affect recovery?
With asynchronous replication, the source write is accepted before the change reaches the destination. A recent object may therefore be missing from the copy during an outage. The possible gap between the latest source write and the recoverable copy is described by RPO. RTO is different: it is how quickly service needs to resume. Plan for both.
Provider targets apply only to particular replication paths. Azure geo-replication is asynchronous, so recent writes may be missing after a regional failure. Google Cloud has separate RPO targets for default and Turbo replication in dual- or multi-region buckets, while cross-bucket replication has no supported RPO because performance depends on locations. Check current service targets and lag metrics, then choose an RPO based on your data and failure scenario. (Google replication and RPO, Azure replication, Azure Geo Priority Replication)
How is a replica different from a backup?
Replication keeps operational data in another location for availability or geographic needs. If deletion, corruption, or a malicious change is propagated, both copies can be affected. A backup can preserve recovery points independently through retention, deletion controls, or account separation. Versioning can preserve history, but it is not by itself an offsite backup.
For recovery, combine replication with backups, deletion protection, version/retention controls, account separation, and tested restore steps. AWS does not replicate permanent deletion of a specific source version by default, while delete-marker replication depends on rule configuration. Google cross-bucket replication does not copy source deletions to the destination. These behaviors are not a blanket backup guarantee; verify provider-specific semantics. (AWS delete behavior, Google cross-bucket limits)
What decisions shape a replication design?
State the purpose: availability, regional recovery, data residency, analytics, or sharing. Then set RPO/RTO, acceptable lag, source/destination ownership and regions, encryption keys, destination read access, costs, and delete/version behavior. Decide whether filters cover only selected prefixes or tags, and plan separately for existing and future objects.
Hypothetical example: an analytics team needs a read-only copy of production data and the copy may also support recovery. Keep destination write access restricted, make freshness visible, and monitor replication status and delay. Recovery also needs an approved regional failover, DNS/application changes, and consistency checks. This is an illustrative scenario, not a tested product configuration.
How should you validate replication and failover?
Test a limited data set and observe how object creation, updates, tags, and deletes reach the destination. Check provider replication status, lag metrics, logs, and failure alerts. Record whether existing objects, versions, delete markers, and lifecycle policies are copied. Verify destination permissions and encryption keys; a missing grant or key can prevent replication or later reads.
Periodically read from the destination and rehearse failover. Confirm the replica is current enough and that the application can use the destination endpoint. Document retrying failed replication, approving promotion, restoring the write path, and returning to the original region. Monitoring replication does not replace a restore exercise.
How do you evaluate cost and operational risk?
Replication can add destination storage, requests, inter-region transfer, processing, notifications, search, and recovery costs. High change rates and large objects can increase lag. Separate accounts require management of permissions, keys, and ownership. Do not assume source lifecycle or bucket settings are copied: AWS excludes some bucket-level settings and lifecycle actions; Google cross-bucket replication does not copy lifecycle configuration.
Estimate source and destination storage, replication requests and transfers, monitoring, versions/retention, failover, and failback work. Review monthly lag, failures, destination capacity, and recovery exercises to confirm that the design still meets operational RPO/RTO. (AWS replication exclusions, Google replication limits and charges)