Azure Storage Blob Access Tiers
Blob storage offers different access tiers that can be used to store infrequently accessed data at the lowest cost. Choosing the right tier can help you optimize your costs based on your access patterns.
Understanding Access Tiers
Azure Blob Storage provides three main access tiers for storing data:
- Hot tier: Optimized for frequently accessed data.
- Cool tier: Optimized for infrequently accessed data.
- Archive tier: Optimized for rarely accessed data that is stored for at least 180 days.
Each tier has different pricing for storage, access, and operations. The hot tier has the highest storage cost but the lowest access cost. The archive tier has the lowest storage cost but the highest access cost and higher latency for data retrieval.
Access Tier Properties
The following table summarizes the key properties of each access tier:
| Feature | Hot Tier | Cool Tier | Archive Tier |
|---|---|---|---|
| Frequency of Access | Frequent | Infrequent | Rare |
| Storage Cost | Highest | Medium | Lowest |
| Access Cost | Lowest | Medium | Highest |
| Data Retrieval Latency | Low (milliseconds) | Medium (milliseconds to seconds) | High (hours) |
| Minimum Retention Period | N/A | 30 days | 180 days |
| Use Cases | Active data, frequently used content, high-performance applications | Backups, disaster recovery, infrequently accessed but readily available data | Long-term archival, compliance data, data that can tolerate high retrieval times |
When to Use Each Tier
Hot Tier
Use the hot tier for data that is actively being used or needs to be accessed quickly. This includes:
- Serving images, CSS, and JavaScript files for websites.
- Storing data for active applications that require low latency.
- Processing frequently accessed datasets.
Cool Tier
The cool tier is a cost-effective option for data that is accessed less often but still needs to be readily available. Consider this tier for:
- Storing backups that might need to be restored occasionally.
- Archiving data for disaster recovery purposes.
- Storing infrequently accessed media files.
Remember that data in the cool tier incurs a minimum storage duration charge.
Archive Tier
The archive tier offers the lowest storage cost and is ideal for data that is rarely accessed and can tolerate significant retrieval times. This tier is suitable for:
- Long-term data archiving for compliance or regulatory reasons.
- Storing historical data that is unlikely to be accessed but must be retained.
- Data that can be retrieved within hours when needed.
Retrieving data from the archive tier can take several hours and incurs higher access costs. Ensure this meets your application's requirements.
Managing Access Tiers
You can set the access tier for blobs and containers. There are several ways to manage access tiers:
- During blob upload: You can specify the tier when uploading a blob.
- Changing existing blob tier: You can rehydrate blobs from the archive tier to the hot or cool tier, or change the tier of blobs already in hot or cool.
- Lifecycle management policies: Automate the movement of blobs between tiers based on rules you define (e.g., move blobs to cool after 30 days and to archive after 180 days).
Example: Setting Blob Tier with Azure CLI
az storage blob set-tier --account-name --container-name --name --tier Cool
Rehydrating Data from Archive Tier
To access data stored in the archive tier, you must first rehydrate it. Rehydration involves retrieving the blob's data to the hot or cool tier. This process can take several hours.
Plan your rehydration requests in advance if you anticipate needing archived data.
Choosing the Right Tier
The optimal choice of access tier depends heavily on your application's access patterns and cost considerations. Regularly review your data access trends to ensure you are using the most cost-effective tiers.
For more detailed information on pricing and best practices, refer to the official Azure Storage pricing page and Azure Blob Storage documentation.