Lesson 3 of 6 Azure Storage Services

Understanding Azure Storage Redundancy Options

This lesson explains LRS, ZRS, GRS and GZRS, read access to the secondary region, and how to choose a redundancy option for a requirement.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe each redundancy option and where it stores copies.
  • Explain the effect of read access to the secondary region.
  • Identify the redundancy option that meets a resilience requirement.

Redundancy in the primary region

Azure Storage always keeps three copies of data in the primary region, in one of two ways.

  • Locally redundant storage (LRS) replicates data three times within a single datacentre in the primary region. It provides at least 99.999999999% (11 nines) durability of objects over a year and is the lowest-cost option. LRS protects against server rack and drive failures, but a disaster such as a fire or flood in the datacentre could make all copies unavailable or lose them.
  • Zone-redundant storage (ZRS) replicates data synchronously across three availability zones in the primary region. It provides at least 99.9999999999% (12 nines) durability, and data remains accessible for reads and writes even if a zone becomes unavailable. Microsoft recommends ZRS in the primary region for scenarios that require high availability.
Fill in the value

Copies and nines

Exam skills 2.3.3

Recall the copies and durability figures for each redundancy option.

Log in to try this activity Interactive activities are free with an account.

Redundancy in a secondary region

For protection against a regional outage, data can also be copied to a secondary region, which is the paired region of the primary and cannot be changed after the account is created. Data is copied to the secondary region asynchronously, so there is a short delay, and in the secondary region it is always stored with LRS.

  • Geo-redundant storage (GRS) copies data synchronously three times within a single datacentre in the primary region using LRS, then copies it asynchronously to a single datacentre in the secondary region. It provides at least 99.99999999999999% (16 nines) durability.
  • Geo-zone-redundant storage (GZRS) combines the high availability of ZRS in the primary region with protection from regional outages by also copying data to the secondary region with LRS. It also provides at least 16 nines of durability and is recommended for applications that need maximum consistency, durability and availability.

With GRS or GZRS, the copy in the secondary region is not available for reading or writing unless a failover to the secondary region occurs. Read-access geo-redundant storage (RA-GRS) and read-access geo-zone-redundant storage (RA-GZRS) add permanent read access to the secondary copy through a separate secondary endpoint, so an application can keep reading data even while the primary region is unavailable. Because replication is asynchronous, the secondary copy may be slightly behind the primary.

True or false

The secondary region

Exam skills 2.3.3

Check how data is copied to a secondary region.

Log in to try this activity Interactive activities are free with an account.

Comparing the options

The options differ in the failures they survive and in cost; more protection costs more. The following table compares them.

OptionCopiesSurvives datacentre failureSurvives zone failureSurvives region failureRead from secondary without failover
LRS3 in one datacentreNoNoNoNo
ZRS3 across zonesYesYesNoNo
GRS3 local + 3 in secondary regionYes (after failover)Yes (after failover)Yes (after failover)No
RA-GRSSame as GRSYes (reads continue)Yes (reads continue)Yes (reads continue)Yes
GZRS3 across zones + 3 in secondary regionYesYesYes (after failover)No
RA-GZRSSame as GZRSYesYesYes (reads continue)Yes

Not every option is available for every account type and region: Premium accounts support only LRS and ZRS, and ZRS and GZRS require a region with availability zones.

The following diagram shows where each option keeps its copies.

Azure Storage redundancy options. LRS keeps three copies in one datacentre and does not survive a datacentre failure. ZRS keeps three copies across availability zones and survives a zone failure. GRS adds three copies in a secondary region to LRS, and GZRS adds them to ZRS, so the data survives a region failure after failover. The RA- variants allow reads from the secondary region without a failover. More protection costs more.
Each dot is one copy of the data.
Scenario questions

Choose the redundancy

Exam skills 2.3.3

Choose the redundancy option for each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

Choosing redundancy

A company stores product images that its website must be able to read even if the entire primary Azure region becomes unavailable, without waiting for a failover. Within the primary region, the images must remain readable and writable if one availability zone fails. Which redundancy option meets both requirements?

The zone requirement needs ZRS in the primary region, and the regional requirement needs a copy in a secondary region with read access that does not depend on failover. RA-GZRS combines both: ZRS in the primary region and a readable LRS copy in the secondary region. GZRS would protect the data but make the secondary copy readable only after a failover, and RA-GRS would provide secondary reads but use LRS in the primary region, so a zone failure could interrupt access.

Check yourself

In which redundancy option is the secondary region's copy always readable?

Show answer

RA-GRS and RA-GZRS. With GRS and GZRS, the secondary copy is readable only after a failover.

Exam Tips

Remember for the exam

  • LRS: three copies in one datacentre. ZRS: three copies across availability zones.
  • GRS and GZRS add an asynchronous copy in the paired secondary region.
  • Read access to the secondary region without failover needs RA-GRS or RA-GZRS.
  • Premium accounts support only LRS and ZRS.