Azure Storage allows developers to create and store copies of data across multiple locations to maintain data availability, integrity, and durability. This feature is known as storage replication. The cloud storage service provides redundancy to protect data against hardware failures and power or network outages. In this cloud computing tutorial, we will explain several redundancy options developers can choose from. Developers can replicate data within one region, or you can replicate it into a geographically distant, secondary region.
Read: Setting Up Budgets and Configuring Alerts in Azure
What are the Types of Azure Storage Replication?
Replication options to be selected during the creation of an Azure Storage account can be seen in the image below. By default, Azure Storage replicates data three times within a primary region that is selected during creation. Azure also offers the following redundancy options you can configure for replication within the primary region:
Locally Redundant Storage (LRS)
Locally redundant storage (LRS) replicates your data synchronously to three disks within a data center in the primary region. This storage replication type offers a moderate level of availability at a lower cost.
LRS replicates three times within a single data center in the primary region. The locally redundant storage provides 99.99% of the durability of your data. Using this type of strategy, data will be copied inside the same data center racks in different fault domains for the purpose of high availability. A write request to a storage account that is using LRS happens synchronously; the write operation returns successfully only after the data is written to all three replicas.
Zone-redundant Storage (ZRS)
ZRS synchronously replicates data in Azure availability zones in the primary region. This Azure storage replication type provides a higher level of resilience at a higher cost. Each Azure availability zone is an individual physical location with its own independent networking, power, and cooling resources. ZRS provides a minimum of 99.99% durability for objects during a given year.
Microsoft recommends using ZRS in the primary region for scenarios that require high availability. ZRS is also recommended for restricting the replication of data within a country or region to meet data governance requirements.
A write request to a storage account that is using ZRS happens synchronously. The write operation returns successfully only after the data is written to all replicas across the three availability zones.
Read: Azure Service Bus Publisher and Subscriber
Geo-Redundant Storage (GRS)
GRS provides additional redundancy for data storage, compared to LRS or ZRS replication types. In addition to the three copies of data stored in one region, there are three copies stored in a paired Azure regi on. GRS provides all the features of LRS storage in the primary zone, and, additionally, provides a secondary LRS data storage in another region. Geo-redundant storage is assured by 99.99%.
In GRS, data is copied to a secondary region. Secondary regions are pre-assigned and cannot be configured or changed. Disadvantages of GRS include the fact that users can not read data from the secondary region using this replication strategy unless Microsoft Azure automatically performs a failover to the secondary region.
Read-Access Geo-Redundant (RA-GRS)
The RA-GRS replication strategy works similar to GRS but allows read-access to data stored in the secondary region. Developers can use multiple readable endpoints. This increases the SLA for read operations to 99.99%. Users can select the replication strategy during the creation of a storage account. Once the storage account has been created and the user sets the replica strategy, the user can switch to a different strategy, depending on the type of strategy initially configured.
Object Replication for Block Blob Storage
Object Replication for Block Blob Storage is a special replication method that is available only for Block Blob Storage accounts. The object replication method is asynchronous; you can use it to automatically move data to an archive tier.
Read more Azure Storage account tutorials, guides, and walkthroughs.