Introduction to the Windows Azure Blob Service
Microsoft provides the Windows Azure Storage services as part of its cloud offerings. These storage services allow secure, scalable, access to durable storage in the cloud. These services are also easy for the developer to access.
Types of Storage Services offered by Windows Azure
The following are the types of services which are offered as part of the Windows Azure Storage Services:
- BLOB service
- Table service
- Queue Service
- Windows Azure Drive
Now we will discuss the BLOB service in detail.
Azure BLOB Service
The Azure Blob Storage Service allows the storing of text and binary data. The service offers three resources – storage account, containers (a way to organize sets of blobs) and blobs.
There are two kinds of blobs:
- Block blobs – These blobs are ideal for streaming content.
- Page blobs – These blobs are ideal for random read/write operations.
These blobs are made up of blocks, uniquely identified by an ID called as block ID. A block blob can be created or modified by uploading a set of blocks marked with the block ID.
Windows Azure Blob Service allows the uploading smaller blobs (smaller than 64MB) via the “Put Block” operation. Each blob uploaded via “Put Block” gets associated with the specified block blob and becomes part of the blob when the “Put Block List” operation is called.
- Block blob size limitations
- Blocks are limited to 4MB in size
- Max allowed size is 200GB
- Maximum allowed number of blocks is 50000
A “page” is defined as a range of data. It is identified by its offset from the start of the blob. A page blob is composed of a collection of such pages.
Page blobs can be created by calling “Put Blob” operation. You have to specify the maximum size. To update the page blob, the “Put Page” operation can be called.
One difference between Page Blob and Block Blobs is that Page Blob updates are committed immediately without calling a separate operation.
Page Blob Size Limitations
- Max size of page blob is 1 TB
- Max size of page is 1 TB
A container is a set of blobs. Containers are organized by account. A URL for a blob contains the account name, the container name and the blob name. Here is an example:
Rules for Naming Containers
- Container names start with letter or number and can only contain alphanumeric and ‘-‘ (dash)
- Consecutive ‘-‘ dashes are not allowed
- Only lower case letters are allowed
- Minimum length – 3
- Maximum length – 63
Rules for Naming Blobs
- Minimum length – 1 character
- Maximum length – 1024 characters
- Any character is permitted – but reserved characters need to be a prefixed with escape character
- One can create hierarchy with blob names
In this article, we introduced you to the Windows Azure Blob service. I hope you have found this information useful.
About the Author
Vipul Patel is a Software Engineer currently working at Microsoft Corporation. He is currently working in the Microsoft Lync team and has worked in the .NET team earlier in the Base Class libraries and the Debugging and Profiling team. He can be reached at email@example.com