Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 15 of 47
❮Prev Next❯

Storage Redundancy and Object Replication

Module 2: Storage ⏱ 12 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Change redundancy and set up object replication Change redundancy, then add an object replication rule.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Under <strong>Data management</strong> open <strong>Redundancy</strong>.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Under Data management open Redundancy.
    2. 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).
    3. 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.
    4. 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.
    5. 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.
    6. Pick the destination account and a container pair. Optional prefix filters, and choose whether existing blobs copy too.
    7. 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.

    😟 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
    🛠️ Solved with: Redundancy + 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

    OptionCopiesSurvivesSecondary readable
    LRS3, one datacenterDisk and rack failuresNo
    ZRS3, three zonesA zone or datacenter failure, stays writableNo
    GRS3 local + 3 in paired region (async)A regional disaster, after failoverOnly with RA-GRS
    GZRS3 across zones + 3 in paired region (async)Zone failure and regional disasterOnly 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

    Media

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    A storage account must remain available for reads and writes if an availability zone in the primary region fails. Data does not need to be copied to another region. You need to minimize cost. Which redundancy option should you choose?

    Question 2

    Question 2 of 5 · Select 2

    Users must be able to read data from a storage account during a regional outage without waiting for a failover. Which redundancy options meet the requirement? Each correct answer presents a complete solution.

    Question 3

    Question 3 of 5

    A storage account uses LRS. You need to change it to ZRS. What should you do?

    Question 4

    Question 4 of 5 · Select 2

    You plan to configure object replication from storage1 to storage2. Which two settings must be enabled? Each correct answer presents part of the solution.

    Question 5

    Question 5 of 5

    You configure object replication between two storage accounts. Which type of data is replicated?

    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. 1.How many copies does LRS keep?Show

      Three, in one datacenter.

    2. 2.What two features must be on for object replication?Show

      Blob versioning on both accounts and change feed on the source.

    3. 3.Where does GRS keep its secondary copy?Show

      In the paired region.

    4. 4.Which redundancy options do premium accounts support?Show

      LRS and ZRS.

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.