Azure Blob Storage Concepts
Azure Blob Storage is Microsoft's object storage solution for the cloud. It is optimized for storing massive amounts of unstructured data, such as text or binary data. Unstructured data includes anything that doesn't adhere to a particular data model or definition, like images, videos, audio files, application executables, log files, and backups.
You can access objects with Blob Storage from anywhere in the world via HTTP or HTTPS, using REST API, Azure Storage SDKs, or Azure CLI. You can also access your data privately from within your virtual network using Azure Private Link.
Key Concepts
Storage Account
A storage account provides a unique namespace in Azure for your data. Every object that you store in Azure Storage is organizationally contained within a storage account. The total size and type of storage account you choose depends on your needs.
There are several types of Azure storage accounts, but for blob storage, you'll typically use:
- General-purpose v2 (GPv2) accounts: Recommended for most scenarios. Supports blobs, file shares, queues, and tables. Offers tiered storage for cost optimization.
- Blob Storage accounts: Optimized for storing blobs. Offers hot, cool, and archive tiers for cost optimization.
Containers
A container is a logical grouping for a set of blobs. You can think of a container as a folder in a file system. A storage account can contain any number of containers, and a container can contain any number of blobs.
Container names must adhere to the following naming rules:
- Container names must start with a letter or number.
- Container names can only contain lowercase letters, numbers, and hyphens (-).
- Container names must start and end with a letter or number.
- Container names must be between 3 and 63 characters long.
- Container names must be specified in a valid URL format.
Blobs
A blob is the simplest type of Azure Storage object. A blob can hold any amount of text or binary data, up to the limit of the storage account. Blobs are typically used to store files.
There are three types of blobs:
- Block blobs: Optimized for storing large amounts of unstructured data, such as documents and media files. Block blobs are composed of blocks of data.
- Append blobs: Optimized for append operations, such as writing to a log file. An append blob is composed of blocks, but blocks can only be added to the end of the blob.
- Page blobs: Optimized for random read and write operations. Page blobs are composed of pages, and are used to store virtual hard disk (VHD) files for Azure virtual machines.
Access Tiers
Azure Blob Storage offers different access tiers to optimize costs based on how frequently data is accessed. The primary tiers for blob storage are:
- Hot tier: Optimized for frequently accessed data. Lower latency and higher access costs.
- Cool tier: Optimized for infrequently accessed data. Higher latency and lower access costs.
- Archive tier: Optimized for rarely accessed data that can tolerate hours of retrieval time. Lowest storage costs but highest retrieval costs.
You can set the access tier at the storage account level or at the individual blob level.
Immutability and WORM
Blob Storage supports immutability policies that allow you to write once, read many (WORM) object storage. This can be useful for regulatory compliance, legal holds, or data archiving.
Immutability can be configured:
- Time-based retention policies: Data cannot be modified or deleted for a specified period.
- Legal holds: Data is protected from modification or deletion until the legal hold is removed.
Common Use Cases
- Serving images or documents directly to a browser.
- Storing files for distributed access.
- Streaming video and audio.
- Writing to log files.
- Storing data for backup and restore, disaster recovery, and archiving.
- Storing data for analysis by an on-premises or Azure-hosted service.