Object replication for block blobs (preview)
Object replication (preview) asynchronously copies block blobs between a source storage account and a destination account. Some scenarios supported by object replication include:
- Minimizing latency. Object replication can reduce latency for read requests by enabling clients to consume data from a region that is in closer physical proximity.
- Increase efficiency for compute workloads. With object replication, compute workloads can process the same sets of block blobs in different regions.
- Optimizing data distribution. You can process or analyze data in a single location and then replicate just the results to additional regions.
- Optimizing costs. After your data has been replicated, you can reduce costs by moving it to the archive tier using life cycle management policies.
The following diagram shows how object replication replicates block blobs from a source storage account in one region to destination accounts in two different regions.
To learn how to configure object replication, see Configure object replication (preview).
Object replication policies and rules
When you configure object replication, you create a replication policy that specifies the source storage account and the destination account. A replication policy includes one or more rules that specify a source container and a destination container and indicate which block blobs in the source container will be replicated.
After you configure object replication, Azure Storage checks the change feed for the source account periodically and asynchronously replicates any write or delete operations to the destination account. Replication latency depends on the size of the block blob being replicated.
Because block blob data is replicated asynchronously, the source account and destination account are not immediately in sync. There's currently no SLA on how long it takes to replicate data to the destination account.
When you configure object replication, a replication policy is created on both the source account and the destination account via the Azure Storage resource provider. The replication policy is identified by a policy ID. The policy on the source and destination accounts must have the same policy ID in order for replication to take place.
A storage account can serve as the source account for up to two destination accounts. And a destination account may have no more than two source accounts. The source and destination accounts may all be in different regions. You can configure separate replication policies to replicate data to each of the destination accounts.
Replication rules specify how Azure Storage will replicate blobs from a source container to a destination container. You can specify up to 10 replication rules for each replication policy. Each rule defines a single source and destination container, and each source and destination container can be used in only one rule.
When you create a replication rule, by default only new block blobs that are subsequently added to the source container are copied. You can also specify that both new and existing block blobs are copied, or you can define a custom copy scope that copies block blobs created from a specified time onward.
You can also specify one or more filters as part of a replication rule to filter block blobs by prefix. When you specify a prefix, only blobs matching that prefix in the source container will be copied to the destination container.
The source and destination containers must both exist before you can specify them in a rule. After you create the replication policy, the destination container becomes read-only. Any attempts to write to the destination container fail with error code 409 (Conflict). However, you can call the Set Blob Tier operation on a blob in the destination container to move it to the archive tier. For more information about the archive tier, see Azure Blob storage: hot, cool, and archive access tiers.
About the preview
Object replication is supported for general-purpose v2 storage accounts only. Object replication is available in the following regions in preview:
- France Central
- Canada East
- Canada Central
- US East 2
- US Central
Both the source and destination accounts must reside in one of these regions in order to use object replication. The accounts can be in two different regions.
During the preview, there are no additional costs associated with replicating data between storage accounts.
The object replication preview is intended for non-production use only. Production service-level agreements (SLAs) are not currently available.
Prerequisites for object replication
Object replication requires that the following Azure Storage features are enabled:
Before you configure object replication, enable its prerequisites. Change feed must be enabled on the source account, and blob versioning must be enabled on both the source and destination account. For more information about enabling these features, see these articles:
Be sure to register for the change feed and blob versioning previews before you enable them.
Enabling change feed and blob versioning may incur additional costs. For more details, refer to the Azure Storage pricing page.
Register for the preview
You can register for the object replication preview using PowerShell or Azure CLI. Make sure that you also register for the change feed and blob versioning previews if you haven't already.
To register for the preview with PowerShell, run the following commands:
# Register for the object replication preview Register-AzProviderFeature -FeatureName AllowObjectReplication -ProviderNamespace Microsoft.Storage # Register for change feed (preview) Register-AzProviderFeature -FeatureName Changefeed -ProviderNamespace Microsoft.Storage # Register for blob versioning (preview) Register-AzProviderFeature -FeatureName Versioning -ProviderNamespace Microsoft.Storage # Refresh the Azure Storage provider namespace Register-AzResourceProvider -ProviderNamespace Microsoft.Storage
Check registration status
You can check the status of your registration requests using PowerShell or Azure CLI.
To check the status of your registration requests using PowerShell, run the following commands:
Get-AzProviderFeature -ProviderNamespace Microsoft.Storage ` -FeatureName AllowObjectReplication Get-AzProviderFeature -ProviderNamespace Microsoft.Storage ` -FeatureName Changefeed Get-AzProviderFeature -ProviderNamespace Microsoft.Storage ` -FeatureName Versioning
Ask questions or provide feedback
To ask questions about the object replication preview, or to provide feedback, contact Microsoft at AzureStorageFeedback@microsoft.com. Ideas and suggestions about Azure Storage are always welcomed at the Azure Storage feedback forum.