Microsoft Azure Storage provides an unstructured storage service for binary and text data known as Blob. It can be used to store any form of data including audio, video, images, documents and other media files. It can be accessed over the internet via HTTP or HTTPS, though the access can be controlled. The data stored in blob storage can be exposed publicly to anyone or can be accessed privately using Shared Access Keys.
Blob storage can be used in following scenarios(not limited to):
- Sharing media/documents over the internet
- Audio & Video live Streaming
- Data backup, disaster recovery, and data archiving
Blob service contains the following three components:
- Storage Account: This is the root of all the Azure Storage resources. It acts as a unique namespace for the storage resources clubbed together. All the storage resources within a storage account are billed together as a single unit.
- Containers: A container refers to a group of blobs. All blobs must be in a container and a container can have any number of blobs.A container does not have any content on its own and only contains properties and metadata.
- Blobs: A blob is an actual file stored in a container. It could be of any type or size. A blob has content, properties as well as metadata.
Any resource within Azure Storage is internet-addressable or in other words, can be accessed over the internet using a resource URI. Resource URI for the shown example will appear like
Since the resources are internet addressable and can be accessed over HTTP, they support the HTTP verbs like GET, PUT, HEAD and DELETE.
There are 3 types of blobs:
- Block Blobs: These blobs are made of blocks. A block blob can have a maximum of 50000 blocks of size 4MB each. Maximum size allowed for a block blob is slightly over 195 GB(50000 * 4). A block blob more than 64MB in size cannot be committed in a single operation and should be committed as a set of blocks – block by block.
- Append Blobs: These blobs are similar to Block blobs except they are optimized for append operations. These blobs are generally used for logging.
- Page Blobs: These blobs store data in pages and are designed to be more efficient for frequent read/write operations. Page blobs are used in Azure VMs as OS and data disks.
Points to note:
- The type of the blob is specified at the time of blob creation and cannot be changed later.
- Blob’s content can be updated anytime using appropriate operations for the type of the blob.
- Two storage accounts can have a container with the same name, but, a container name is unique within a storage account.
- Two containers can have blob with the same name, but, a blob name is unique within a container.
- Container names should always be in lowercase and should always start with a letter or a number.
- Blob names are case sensitive, hence, keep a note of the casing while creating a blob.