In the last part of our Azure Storage series, we discussed the Azure Storage Account, which is the actual gateway between your Azure subscription and contents. Now it’s time to outline the services in the form of different abstractions, such as blobs, tables, disks, queues and files. This part walks through Blob storage.
Follow me:
Latest posts by Anil Erduran (see all)

Let’s start with the basics. Blob stands for “binary large object” and is a collection of binary data stored as a single entity. You can think of blobs as files we use every day. Any unstructured object data, such as text, binary, images, documents, video or audio, are accepted as blobs by Azure.

Blob storage is usually used for storing images, documents, video/audio for streaming, backup/logging data or contents for cloud applications. It’s also the default storage type for virtual machine disks (VHDs) created in Azure. ¸

Blob storage is also much cheaper compared to file storage in Azure and is an excellent way to have persistent data storage for your Internet-scale applications.

Blob types ^

In general, three types of blobs exist in an Azure environment: page, block and append.

Page blobs are commonly used to store VHDs and are designed for random read/write access. Azure provides two types of storage account for page blobs – Premium and Standard. Read my article about storage accounts for more information.

Block blobs are for everything you can think of as a file. Each block in one of these types of blobs can be a different size, up to a maximum of 4 MB, and a block blob can include up to 50,000 blocks. The maximum size of a block blob is therefore slightly more than 195 GB (4 MB X 50,000 blocks).

An append blob is an optimized blob for append operations. The main difference between a block blog and an append blog is that when you modify an append blob, new blocks are added to the end block. It is a good fit especially for logging scenarios.

Blob namespace ^

As I mentioned in previous parts, Azure Storage keeps a single global accessible namespace that leverages DNS so that it is addressable for storage actions. Blobs in the Azure Storage namespace are identified by URIs. An Azure Storage URI is divided into three parts: the endpoint (address of the storage service), the container name and the blob name. The endpoint consists of the Storage account name (anilerduran in the example) and the address of the storage cluster. In my example, the endpoint is

Storage endpoints

Storage endpoints

The second part of the URI is the container name. It corresponds to a folder in a file system namespace and allows you to organize your blobs. In my example, the container names are test and test2.



Finally, the third part is the name of the blob.

Azure Storage blobs

Azure Storage blobs

Before reaching out to the final content (blob), you need a Storage account and containers to be created to store individual blobs.

Containers provides a simple grouping of different blobs and also allows you to set the access control at the container level.

Container access levels

Container access levels

Access levels ^

Three types of access levels can be set per container.

Private: Blob within the container will be accessible by the account owner

Blob: Gives the public read access for blobs

Container: Gives the public read and list access to the entire container

You can choose either to create a bunch of containers and store your blobs in them or to create one single container for storing all of your blobs. It really depends on your application’s requirements. Having multiple containers provides more granular access control over your content.

As partitioning in Azure blobs is done at the blob level (URL for blob itself is the smallest object that will be load balanced by Microsoft), and as containers can grow as large as you need them to grow within the storage account limit, it really doesn’t matter from a scalability perspective whether you have multiple or single containers for hosting blobs.

Get started with Blob storage ^

You can create a storage account and a container on the Azure Portal, and you can also use the Web interface to upload your blob to Microsoft’s cloud. This is fine as long as you are dealing with only a few blobs. If you want to automate blob management, you can work with the Azure PowerShell module.

Azure PowerShell is distributed through the Microsoft Web Platform Installer (Web PI) and PowerShell Gallery. To install Azure PowerShell, run the following commands:

Install Azure PowerShell module

Install Azure PowerShell module

I have created a very basic PowerShell menu script for taking initial storage actions on an Azure subscription.

Azure Storage activities

Azure Storage activities

Uploading a blob into a container

Uploading a blob into a container

Blobs on Azure Portal

Blobs on Azure Portal

Downloading all blobs

Downloading all blobs

Please note that the script is quite basic; several actions can be taken to demonstrate how easy it is to use PowerShell in the Azure Blob storage service.

Some important points must be considered when using PowerShell to manage blob storage. Let’s take a look at them:

  • Azure PowerShell allows you to encapsulate your storage credentials in an object so that you can easily authenticate without specifying account details each time. We call this “Storage Context.”

  • While creating a new container for your blobs, you should also set the level of access. As mentioned above, three levels of anonymous access to blobs exist: Off, Blob, and Container. You can establish the access level using the -Permission

  • It’s possible to create snapshots to back up a blob as it appears at a moment in time. A blob can have any number of snapshots. To create a snapshot, you should call the ICloudBlob.CreateSnapshot method on a blob reference you have created before.

$blobReference = Get-AzureStorageBlob -Context $StorageContext -Container $ContainerName -Blob $BlobName$snaphot = $blobReference.ICloudBlob.CreateSnapshot()

  • Some additional tasks cannot be completed on blobs.
Available storage commands

Available storage commands

In the text post of my Azure Storage series I will discuss Table Storage.

Want to write for 4sysops? We are looking for new authors.

Read 4sysops without ads by becoming a member!


Leave a reply

Your email address will not be published. Required fields are marked *


© 4sysops 2006 - 2020


Please ask IT administration questions in the forums. Any other messages are welcome.


Log in with your credentials


Forgot your details?

Create Account