Zone-Redundant Storage (ZRS)
Zone-redundant storage (ZRS) protects data by synchronously copying it across three separate availability zones within a single Azure region. An availability zone is a distinct physical location with its own power, cooling, and network. This setup ensures your data remains available even if an entire data center fails. ZRS provides very high durability and is recommended for workloads that need high availability and must keep data within a specific geographic region for governance reasons. Unlike some other options, ZRS allows applications to continue reading and writing without interruption during a zonal outage.
Geo-Redundant and Geo-Zone-Redundant Storage
For protection against a major disaster affecting an entire region, you can use geo-redundant storage (GRS) or geo-zone-redundant storage (GZRS). Both options asynchronously copy your data to a secondary geographic region hundreds of miles away. The key difference is the protection in the primary region: GRS uses locally redundant storage (LRS), while GZRS uses the stronger ZRS. In both cases, the data in the secondary region is always stored using LRS. These options are critical for business continuity and provide the highest levels of data durability.
Read-Access Geo-Redundancy
To maximize availability, you can enable read-access geo-redundant storage (RA-GRS) or RA-GZRS. These options provide a secondary, read-only endpoint in the paired region. If the primary region becomes unavailable, applications can be designed to shift their read operations to this secondary endpoint. It's important to know that data on the secondary side is eventually consistent, meaning it may be slightly behind the primary due to the asynchronous replication. Note that Azure Files does not support read-access geo-redundancy.
Managing Failover and Data Residency
A failover is the process of making the secondary region the new active primary region. This is done by updating DNS records. An unplanned failover carries a risk of data loss because replication is asynchronous; the recovery point objective (RPO) is typically under 15 minutes. Importantly, initiating an unplanned failover converts the storage account to LRS in the new region, and you must manually re-enable geo-redundancy afterward. You must also consider data residency, as the paired secondary region is fixed by Azure and cannot be customized.
Configuration and Constraints
You configure storage redundancy through the Azure Portal, PowerShell, or CLI. Adding geo-redundancy is often a simple setting change, but switching to zone-redundancy usually requires a conversion process or a manual migration. There are important constraints: Premium SSD file shares only support LRS or ZRS, not native geo-redundancy. Higher redundancy levels like GZRS also incur higher storage costs and potential charges for cross-region data transfer.
Apply Redundancy Settings to Support Data Protection and Recovery
Redundancy and Recovery Objectives
Choosing an Azure Storage redundancy option is a direct way to support your data protection and disaster recovery plans. The redundancy model you select defines your recovery point objective (RPO), which is how much data loss you can tolerate, and your recovery time objective (RTO), which is how quickly you need to restore operations. These options protect against failures ranging from a single hard drive to an entire region.
Options Within the Primary Region
For protection within your primary region, you have two main choices. Locally redundant storage (LRS) is the most cost-effective. It replicates your data three times within a single datacenter, protecting against hardware failures but not against a disaster that affects the whole building. Zone-redundant storage (ZRS) provides higher availability by synchronously replicating data across three physically separate availability zones in the same region. ZRS is recommended for applications that require continuous operation.
Geo-Redundancy and Account Failover
To protect against a regional outage, you use geo-redundant options. Geo-redundant storage (GRS) replicates data from an LRS primary to an LRS secondary region. Geo-zone-redundant storage (GZRS) replicates data from a ZRS primary to an LRS secondary region. A key feature of these options is support for storage account failover. During an outage, you can initiate this failover, which updates DNS so that the secondary region's endpoints become the new primary, restoring full read and write access.
Designing for High Availability with Read Access
For the highest availability design, you can use read-access geo-redundant storage (RA-GRS) or RA-GZRS. These provide read access to the secondary endpoint. This allows applications to continue serving read requests even if the primary region is completely down. Applications must be designed to handle eventual consistency, as the data in the secondary region will be slightly behind the primary.
Failover Types and Management
Azure supports three failover types. A customer-managed unplanned failover is for real outages, while a customer-managed planned failover is for testing. A Microsoft-managed failover is initiated by Microsoft only in extreme, region-wide disasters and should not be relied upon for your recovery plans. After an unplanned failover, the account is converted to LRS, and you must manually re-enable geo-redundancy, which involves data transfer costs. Always check the Last Sync Time property before a failover to understand potential data loss.
Evaluate Redundancy Models
Overview of Redundancy Options
Azure Storage ensures data is durable and available by keeping multiple copies. The different redundancy models protect against various levels of failure. Your choice balances cost against the level of protection you need for your data and applications.
Comparing the Options
The main redundancy options form a spectrum from least to most protective:
- Locally Redundant Storage (LRS): The lowest-cost option. It stores three copies within one datacenter, protecting only against local hardware failures.
- Zone-Redundant Storage (ZRS): Stores copies across three availability zones in one region, protecting against a datacenter failure.
- Geo-Redundant Storage (GRS): Adds asynchronous replication to a secondary region for protection against regional disasters.
- Read-Access Geo-Redundant Storage (RA-GRS): Like GRS but allows read access from the secondary region during an outage.
- Geo-Zone-Redundant Storage (GZRS) and RA-GZRS: Combine ZRS in the primary region with geo-replication, offering the highest level of protection.
Decision Criteria for Selection
When evaluating which model to use, consider three main factors. First, balance cost versus availability: LRS is cheapest but offers the least protection, while GZRS offers the most at a higher price. Second, determine your replication needs: decide if you need protection only within a region (LRS/ZRS) or across regions (GRS/GZRS). Third, assess if your application needs read access during an outage, which would point you toward RA-GRS or RA-GZRS.