DEV Community

Pratik Pathak
Pratik Pathak

Posted on • Originally published at pratikpathak.com on

[2024 Updated] Full Guide Azure Blob Storage with Examples

Hello Everyone! In this article, we are going to talk about blob storage and the different types of blog storage offered by Azure Cloud.

Blob Storage is one of the most popularly used storage, It can save up to 500 TB, yes you heard it right up to “500 TB”. A single file in a blob storage can be up to “4 TB”. It also has a very high read and write speed.

To create blob storage you need to create a Storage account in Azure.

Don’t know how to create a storage account? Don’t worry Click the below link to learn How to Create a storage account in Azure.

What is Blob Storage in Azure?

Blob Storage is one of the storage types provided by different cloud providers, It is used for storing unstructured data such as Images, audio, videos, etc. Whatever file we upload in the blob storage we refer to it as a blob and every blob has its unique URL; with this URL we can access it.

Blog Storages has something known as containers it’s kinda like a folder hierarchy.

Why Azure Blog Storage is so Fast?

Whenever we upload a file in blob storage, blob treats it as a binary file. It doesn’t treat video or image files differently, for the blob all files are binary files.

Now you will think what happens if I upload a video will it become unplayable?

Nope! It does not work like that, Let’s say you requested your video file via a website, the blob will give it to you and then your browser will play it for you.

Hot, Cool, and Archive Azure Blob Storage

Depending on the Access there are 3 Types of Blob Storage which are Hot, Cool, and Archive.

Note: There is one more type – Premium which is similar to HOT but it’s more faster and reliable than the Hot tier

Different Types of Access Tier in Blob Storage

Hot Storage is most Widely used. It is used for the data that we frequently access, While in the cool we save those data which we use some time, and in the Archive we save those data which we rarely use.

Now you will think what is the purpose of Archive Storage?

The answer is pretty simple. We all have some data that we never needed but still we need to save it for example log files, in case something happens so we can retrieve it. The pricing of all these 3 tiers is completely different.

Azure Blob Storage with Examples




Pricing of different blob access tier

Azure Blob Storage with Examples
Pricing of different blob access tier

Azure Blob Storage with Examples
Pricing of different blob access tier

HOT costs around $0.0184/GB while COOL costs $0.0100/GB which is around 50% cheaper and the ARCHIVE costs $0.00099/GB which is even cheaper. But there is one problem. If the data is stored in Archive then it will take around 18 hours just to read it.

As we know there are different types of buckets and each has different kinds of pros and cons. The biggest con of Blob storage is read speed, The read speed of Blob storage is

Hot > Cool> Archive

How to change the Azure blob tier? wanna learn how to change the blob tier?

click here to learn how to change the Azure blob tier. Azure Blob Storage with Examples

Why use Blob Storage?

  • Highly Scalable
  • Blob Snapshot
  • Blob Versioning
  • Cheaper

Azure Blob Storage Life Cycle Management

Let’s say you have 100 files in Hot Blob storage but not all the files are frequently accessed in this scenario you are paying for those files the same as Hot Blob, what if some settings automatically change tiers of these blobs when they are not access?

Yes! This is possible by using Azure Blob Storage Life Cycle Management Policies. Azure Blob Storage Life Cycle Management will automatically convert the tier of blobs or even delete them when they are not accessed.

Things to remember about Azure Blob Storage Life Cycle Management Policies:

  • Auto Transition Policy – changing tiers of blobs, from hot to cool and vice versa
  • Auto Blobs – You can transition Blobs, versions, and snapshot
  • Auto Deletion Policy – Automatic rules to delete blobs
  • Auto Rules Policy – Rules can be applied to the storage account level of a subset of blobs

How to Apply LifeCycle Management Rules?

Azure Archive Blob Storage Rehydration Policy:

When a file is uploaded in Archive Blob storage it takes up to 24 hours just to access. This is called the Rehydration Policy.

While Rehydrating a blob Azure asks you to set Priority. Azure offers two types of Rehydration Priority viz. Standard Priority and High Priority.

If you set priority to “High Priority” it will rehydrate the blob in an Hour up to 10GB of file. While standard priority takes around 16 hours.

How to Access the Azure Blob –

On the Azure cloud there are different types of users like developers, auditors, viewers, Applications, etc based on the requirements there are different types of access methods available.

You can also use Azure Portal to access the blob storage but it has very limited functionality.

Azure Storage Account Authorization Methods
Azure Storage Account Authorization Methods

1. Active Directory Access Azure Blob Storage

This method is for the users who are in your active directory. Firstly you need to add the user to your active directory and then you have to assign storage access using “Identity and Access Management” to that user then you can access the data.

To access the data using the Azure active directory the best and easiest method will be to use “Azure Storage Explorer“.

How to use Azure Storage Explorer?

Learn from here: https://www.youtube.com/watch?v=GJYAgi5eYYE

2. Access Keys Azure Blob Storage

This method is mostly used by developers to connect the application with storage. You can also use the “Azure Storage Explorer” application to connect it using Access Keys.

You will have two keys, Why there are two keys?

you can use either of the keys. This is done for security purposes, if you want to change the keys, set your application to a secondary key, rotate your primary key, set your application to a primary key, and finally rotate your second key.

Learn: Connect to Azure Blob Storage using Python

3. Shared Access Keys Azure Blob Storage

Shared Access Keys are the easiest way to give temporary access to people who do not belong to your organization or to give limited/time-specific access. It is also known as Azure blob storage anonymous access.

Screenshot 2023 12 12 224520

It is just a long key and by using this key you can control the access and also apply restrictions to the users who are using this Access key.

You can apply the Shared Access Key to the Storage level as well as the Blob level. If you apply it on the storage level then all the data inside the storage account will be accessible

Note: You can use the access policy to control the access at a granular level

Azure Blob Versioning vs Azure Blob Snapshot

Both Blob Versioning and Blob Snapshot are used to save files at a particular savepoint. But there is one major difference

Azure Blob Versioning:

Blob Versioning is used to create versions of a file, it’s like GIT, whenever there is a modification in data it will save it as a new version. You can easily switch between any version. Versions creation is automatically done in the background. By default Blob Versioning is disabled.

How to Create Blob Versioning?

Click here to learn more

Azure Blob Snapshot:

Azure Blob Snapshot is used to create a snapshot of a particular file at a particular time. it is not automatic you need to do a snapshot manually.

How to Create Blob Snapshot?

Click here to learn more

What is the difference between Azure Blob Version and Azure Blob Snapshot?

the working of both is quite similar, it depends on use cases. Creating a version on each modification will take up a lot of space and also some files we don’t need to track. Cases like where we need to create a recovery point before making any major changes. In such scenarios, we use Blob Snapshot in place of Blob versioning.

Top comments (0)