Storage Redundancy and Object Replication
30-second answer
Redundancy decides how many copies Azure keeps and where: LRS (3 copies in one datacenter), ZRS (3 copies across availability zones), GRS (LRS plus an asynchronous copy in the paired region) and GZRS (ZRS plus a paired-region copy). RA-GRS and RA-GZRS also let you read the secondary. Changing between LRS and GRS is a simple update; adding zones (LRS to ZRS, GRS to GZRS) is a conversion. A customer-managed failover promotes the secondary during an outage. Object replication is different: it asynchronously copies block blobs from a container in one account to a container in another, and needs versioning on both accounts and the change feed on the source.
Simulate it » No Azure account neededExam objective: 2.2.2 Configure Azure Storage redundancy. 2.2.3 Configure object replication. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Under <strong>Data management</strong> open <strong>Redundancy</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Under Data management open Redundancy.
- The account is LRS: three copies in one datacenter. Change it to GRS and Azure adds an async copy in the paired region (West US).
- A day later, go from GRS to GZRS. That’s a conversion (zones get added), not an instant switch. Last sync time shows how current the secondary is.
- If the primary region goes down you can start a customer-managed failover. Unplanned failover makes the secondary the primary and the account becomes LRS there.
- Now Object replication: copy blobs to an account in another region. Versioning must be on in both accounts and the change feed on the source.
- Pick the destination account and a container pair. Optional prefix filters, and choose whether existing blobs copy too.
- New block blobs in photos now copy across asynchronously. CLI: az storage account or-policy create.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Redundancy and a region outage
LRS keeps 3 copies in one datacenter, ZRS spreads 3 across availability zones, GRS adds an async copy in the paired region and GZRS combines both. RA- versions let you read the secondary. A customer-managed failover promotes the secondary when the primary region is down.
🤔 What happens if…
Read this tour as text
- The front door: the storage firewall. Every account has a public endpoint that accepts all networks by default. Set the default action to Deny and only what you list gets in: virtual network rules (subnets with the Microsoft.Storage service endpoint), IP rules (public addresses only) and trusted Azure services if you tick the exception.
- Three ways in, plus one for file shares. Callers prove who they are with an account key (full control), a SAS (limited rights for limited time) or a Microsoft Entra ID token checked against RBAC data roles. For SMB file shares, users bring a Kerberos ticket from AD DS, Microsoft Entra Domain Services or Microsoft Entra Kerberos.
- SAS tokens and stored access policies. A service SAS can point at a stored access policy on the container (up to 5 per container). The policy holds the permissions and expiry, so deleting or editing it revokes every SAS that names it. An ad hoc SAS can only be revoked by regenerating the key that signed it.
- Rotate access keys. Each account has two keys so you can rotate without downtime: move apps to key2, regenerate key1, and next time do the reverse. A key expiration policy flags old keys. Regenerating a key kills every SAS signed with it.
- Encryption at rest. Azure Storage always encrypts data with AES-256. By default Microsoft manages the key. With a customer-managed key in Key Vault (soft delete and purge protection on), the account’s managed identity wraps and unwraps its data key with your key, and you can revoke it.
- Redundancy and a region outage. LRS keeps 3 copies in one datacenter, ZRS spreads 3 across availability zones, GRS adds an async copy in the paired region and GZRS combines both. RA- versions let you read the secondary. A customer-managed failover promotes the secondary when the primary region is down.
- Moving data: AzCopy and object replication. AzCopy moves files in parallel from the command line, signed in with Microsoft Entra ID (and a Storage Blob Data role) or with a SAS. Storage Explorer does the same with a GUI. Object replication keeps copying new block blobs to another account by itself.
- Access tiers and lifecycle management. Blobs sit in Hot, Cool (30-day minimum), Cold (90 days) or Archive (180 days, offline). A lifecycle management rule moves or deletes blobs by age or last access, about once a day. Reading an archived blob means rehydrating it first.
- Undo buttons: soft delete, versioning and snapshots. Blob soft delete and container soft delete keep deleted items for 1 to 365 days. Versioning keeps every previous version of a blob. For Azure Files, share snapshots are read-only point-in-time copies and share soft delete keeps a deleted share.
Contoso Media needs a photo account that is locked down on day one, ages old files into cheaper tiers, uses its own encryption key, survives a zone failure and keeps a copy in another region. Build it one decision at a time.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
One datacenter fire would take every product photo offline.
😊 THE SOLUTION
Pick ZRS, GRS or GZRS and replicate key containers to another account.
- Datacenter failure✓ ZRS across zones
- Region outage✓ GRS/GZRS and failover
- Copy near other users✓ Object replication
Start with a question
Where do you keep copies of your family photos so that one bad day can't wipe them all out?
Three copies on one laptop protect you from a corrupt file, not from a stolen laptop. Copies on three devices in three rooms survive a burst pipe. A copy at your cousin’s house in another city survives a fire on your street.
Azure Storage gives you the same choices: LRS (one building), ZRS (three buildings across availability zones), and GRS/GZRS (plus a copy in another region). Object replication is different again: it’s you choosing to send certain albums to a friend abroad.
Explain it like I’m 10
The technical explanation
The four options
| Option | Copies | Survives | Secondary readable |
|---|---|---|---|
| LRS | 3, one datacenter | Disk and rack failures | No |
| ZRS | 3, three zones | A zone or datacenter failure, stays writable | No |
| GRS | 3 local + 3 in paired region (async) | A regional disaster, after failover | Only with RA-GRS |
| GZRS | 3 across zones + 3 in paired region (async) | Zone failure and regional disaster | Only with RA-GZRS |
With read access, the secondary endpoint is https://<account>-secondary.blob.core.windows.net. Premium accounts support LRS and ZRS only. The Archive tier is supported on LRS, GRS and RA-GRS accounts, not on zone-redundant ones. Prices rise roughly in the order LRS, ZRS, GRS, GZRS: for 1 TB of Hot data, LRS is around $20 a month and GRS about double (illustrative).
Changing redundancy
Portal: Data management > Redundancy.
- LRS ↔ GRS / RA-GRS: a simple update (
az storage account update --sku Standard_GRS). - Adding or removing zones (LRS ↔ ZRS, GRS ↔ GZRS): a conversion that runs in the background while the account stays online (
az storage account migration start --sku Standard_ZRS). To go LRS to GZRS, change to GRS first and then convert.
Failover
If the primary region is down, a customer-managed failover (Redundancy blade, Prepare for failover, or az storage account failover) promotes the secondary. Check Last Sync Time first: writes after it may not be in the secondary and are lost in an unplanned failover. Afterwards the account is LRS in the new primary until you turn geo-redundancy back on. A planned failover swaps the regions without data loss, useful for drills.
Object replication
Object replication copies block blobs from a source container to a destination container in another storage account, in any region or subscription, asynchronously. It’s for latency (data near users), separation (a copy in another account) and processing pipelines, not for disaster recovery of the whole account.
Rules to remember:
- Blob versioning on both accounts, and the change feed on the source.
- Block blobs only. Blobs in the Archive tier, snapshots and hierarchical namespace accounts aren’t supported.
- A policy holds rules (container pairs) with optional prefix filters and a minimum creation time that decides whether existing blobs copy.
- A source account can replicate to at most two destination accounts.
- Cross-tenant replication is blocked unless Allow cross-tenant replication is on.
Portal: Data management > Object replication > Create replication rules.
az storage account blob-service-properties update -g rg-storage-prod -n stcontosoprod \
--enable-versioning true --enable-change-feed true
az storage account blob-service-properties update -g rg-storage-prod -n streplicaweu \
--enable-versioning true
# Created on the destination; then apply the same policy to the source
az storage account or-policy create -g rg-storage-prod --account-name streplicaweu \
--source-account stcontosoprod --destination-account streplicaweu \
--source-container photos --destination-container photos-replica \
--min-creation-time 2026-11-01T00:00:00Z
Set-AzStorageAccount -ResourceGroupName rg-storage-prod -Name stcontosoprod -SkuName Standard_GRS
Invoke-AzStorageAccountFailover -ResourceGroupName rg-storage-prod -Name stcontosoprod
Architect level RPO, SLA and what geo-replication doesn't do
Geo-replication typically keeps the secondary within about 15 minutes of the primary, but there’s no SLA on that number. Replication copies deletes and corruption too, so redundancy is not a backup. Pair it with soft delete, versioning, point-in-time restore or Azure Backup for blobs.
Real-world business scenario
Contoso Media (fictional)
- The problem
- Product photos lived in one LRS account in East US. A datacenter incident took the site's images offline for hours, and European customers complained about slow loading.
- What they used
- The account was changed to GRS and then converted to GZRS. Object replication now copies the photos container to an account in West Europe, which the European site reads from.
- Why that choice
- GZRS survives a zone failure and has a copy in the paired region. Object replication puts images near European users without waiting for a failover.
- The result
- A later zone outage went unnoticed by customers, and European page loads got faster.
When to use it and when not to
✓ Use it when…
- Production data that must survive a zone failure (ZRS or GZRS).
- Data you must recover after a regional disaster (GRS or GZRS).
- Blobs that should also live in another account or region you choose (object replication).
✕ Think twice when…
- Data you can easily recreate (LRS is cheaper).
- Protection from accidental deletes (use soft delete and versioning; replication copies deletes).
- Archive-tier or hierarchical namespace data with object replication.
↔ Alternatives to consider
- AzCopy for one-off copies between accounts.
- Azure Backup for blobs for point-in-time recovery.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between ZRS and GRS?
Model answer
ZRS spreads three copies across three availability zones in one region, so it survives a zone or datacenter failure and stays writable. GRS keeps three copies in one datacenter plus three more in the paired region, so it survives losing a whole region, but the secondary copy is asynchronous and you have to fail over to use it.
Intermediate How do you change an LRS account to ZRS?
Model answer
It's a conversion, not a quick setting change, because data has to be spread across zones. In the portal you pick ZRS on the Redundancy blade and Azure starts the conversion, or in the CLI az storage account migration start with --sku Standard_ZRS. The account stays online. LRS to GRS, on the other hand, is a simple update.
Experienced developer What happens during an unplanned customer-managed failover?
Model answer
The secondary region becomes the primary and DNS points there. Because geo-replication is asynchronous, any writes after the Last Sync Time can be lost, so I check that first. After failover the account is LRS in the new primary, and I have to reconfigure geo-redundancy. A planned failover, used for drills, keeps geo-redundancy and loses nothing.
Scenario Users in Europe need low-latency reads of product images stored in an East US account. GRS is already on. Does that help?
Model answer
Not really. GRS goes to the paired region, West US, and the secondary isn't readable unless it's RA-GRS. I'd use object replication to copy the images container to an account in West Europe and point European users at it. That needs versioning on both accounts and the change feed on the source.
Quick revision
Key points
- LRS 3 copies one datacenter; ZRS 3 across zones; GRS LRS + paired region; GZRS ZRS + paired region.
- RA- options allow reads from the secondary endpoint (<account>-secondary).
- Premium accounts support LRS and ZRS only.
- LRS to GRS is an update; LRS to ZRS and GRS to GZRS are conversions.
- Unplanned failover can lose writes after Last Sync Time and leaves the account LRS.
- Object replication needs versioning on both accounts and change feed on the source; block blobs only.
Important terminology
- Locally redundant storage (LRS)
- Three synchronous copies in one datacenter in the primary region.
- Zone-redundant storage (ZRS)
- Three synchronous copies across three availability zones in the primary region.
- Geo-redundant storage (GRS)
- LRS in the primary region plus an asynchronous LRS copy in the paired secondary region.
- Geo-zone-redundant storage (GZRS)
- ZRS in the primary region plus an asynchronous LRS copy in the paired secondary region.
- Last Sync Time
- The point up to which writes are guaranteed to be in the secondary region. Writes after it may be lost in an unplanned failover.
- Object replication
- An account feature that copies block blobs asynchronously from a source container to a destination container in another storage account.
Common mistakes
- Thinking GRS lets you read from the secondary without failover (that's RA-GRS).
- Thinking object replication is the same as GRS.
- Expecting Archive-tier blobs to replicate.
Exam tips
- "Survive a zone outage and stay writable" = ZRS (or GZRS).
- "Read data during a regional outage without failover" = RA-GRS / RA-GZRS.
- "Copy blobs to an account in a region you choose" = object replication.
Five quick revision questions
-
1.How many copies does LRS keep?Show
Three, in one datacenter.
-
2.What two features must be on for object replication?Show
Blob versioning on both accounts and change feed on the source.
-
3.Where does GRS keep its secondary copy?Show
In the paired region.
-
4.Which redundancy options do premium accounts support?Show
LRS and ZRS.
-
5.What property tells you how current the secondary region is?Show
Last Sync Time.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Move Data with Azure Storage Explorer and AzCopy
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.