Microsoft Azure Documentation

Azure Blob Storage Tiers

Microsoft Azure Blob Storage offers different access tiers to optimize costs by storing infrequently accessed data in a cost-effective tier. These tiers provide flexibility in managing your storage costs based on access patterns.

Understanding Blob Storage Tiers

Azure Blob Storage provides three primary access tiers:

Important Considerations

When choosing a tier, consider the following:

  • Access Frequency: How often will you need to access the data?
  • Retrieval Time: How quickly do you need access to the data?
  • Cost: Storage costs vs. access and retrieval costs.

Choosing the Right Tier

The optimal tier depends on your specific workload and data access patterns. Here's a general guideline:

Tier Data Access Frequency Storage Cost Access Cost Minimum Data Duration Retrieval Time
Hot Frequent Highest Lowest N/A Milliseconds
Cool Infrequent Medium Medium 30 days Milliseconds
Archive Rare Lowest Highest 180 days Hours (Standard) to Minutes (Priority)

Managing Blob Tiers

You can set the access tier for a blob when you upload it or change the tier of an existing blob. This can be done using the Azure portal, Azure CLI, PowerShell, or client libraries.

Setting Access Tier on Upload

When uploading a blob, you can specify its initial access tier. For example, using Azure CLI:


az storage blob upload \
    --account-name  \
    --container-name  \
    --name  \
    --file  \
    --access-tier  \
    --auth-mode login
            

Changing Access Tier of Existing Blobs

You can rehydrate data from the Archive tier to the Hot or Cool tier, or move data between Hot and Cool tiers. Changing the tier of a blob can incur rehydration or transaction costs.

Example using Azure CLI to change a blob's tier:


az storage blob set-tier \
    --account-name  \
    --container-name  \
    --name  \
    --tier  \
    --auth-mode login
            

Lifecycle Management

Azure Blob Storage offers Lifecycle Management policies that automatically transition blobs between tiers based on rules you define (e.g., move blobs to Cool after 30 days, then to Archive after 180 days). This is highly recommended for optimizing costs automatically.

Learn more about Lifecycle Management.

Rehydration from Archive Tier

Retrieving data from the Archive tier is a two-step process:

  1. Initiate Rehydration: You request to rehydrate the blob to the Hot or Cool tier.
  2. Access the Blob: Once rehydration is complete, you can access the blob.

Rehydration can take several hours for standard priority or minutes for priority rehydration (which incurs higher costs). During rehydration, the blob remains in the Archive tier, and you cannot access its content.

Conclusion

By strategically using Azure Blob Storage tiers, you can significantly reduce your storage costs while ensuring your data is accessible when needed. Regularly review your data access patterns and adjust tiers or implement lifecycle management policies accordingly.