Azure Storage Account

Rocco Scaramuzzi
rocco.tech
Published in
5 min readNov 17, 2019

If you have an application running Azure Virtual Machine or in a PaaS (Platform as a service) component and this application needs to store files then Azure Storage is your best solution. Even if your application is running in a virtual machine, it’s not a good practice to store files inside the disk for several reasons such as cost, coupling and scalability.

These are the two main advantages of using Azure storage accounts:

  • Decoupling: we don’t have one single point of failure. For example, the assets in your Azure Storage will still be available even if your application fails to run.
  • Scalability: Azure storage is a service designed to scale.

The objective of this article is to help you to decide which storage service to utilize and how to select the right settings in terms of performance, access and replication.

Storage Services

Azure Storage provides four types of services.

Azure Storage services
  1. Blob Container storage: it’s mainly used to store object type data such as images, videos, spreadsheets, etc.
  2. File storage: this is used as a shared file place. This is accessible via the industry standard Server Message Block (SMB) protocol and you can mount the file storage from your Windows, Linux, macOS machine.
  3. Table storage: this is NoSQL key-value storage mainly used to store very simple structure data such as operation logs, user access information which needs to have really quick access.
  4. Queue storage: this is the simplest asynchronous message queuing in Azure used to exchange information between different components.

Storage Accounts

When setting up an Azure storage account, you can choose between four types of Accounts.

Azure storage account
  1. Block Blob storage accounts: only used to store Blob objects with premium performance characteristics. Recommended for scenarios with high transaction rates, using smaller objects, or requiring consistently low storage latency.
  2. File Storage storage accounts: only used to store files with premium performance characteristics. Recommended for enterprise or high-performance scale applications.
  3. General Purpose v1: this allows us to use the Blob, File, Queue and Table service. This is a legacy account, instead please use general-purpose v2 accounts when possible.
  4. General Purpose v2: this allows us to use the Blob, File, Queue and Table service.

Performance Tiers

Azure storage provides two performance tiers.

Azure storage performance tier
  1. Standard: this allows storage of blobs, files, tables, queues and Azure virtual machine disks.
  2. Premium: this allows storage of unmanaged virtual machine disks only.

So, most of the time we should be using the Standard option unless we want to use the storage to create an unmanaged disk for virtual machines.

Access Tiers

Azure storage provides two main access tiers.

Azure storage access tier
  1. Hot: This is ideal for frequently accessed data. The cost for this tier is higher for storage but it’s lower for the access.
  2. Cool: this is ideal for infrequently accessed data. The cost for this tier is lower for storage but it’s higher for the access.

Please note there is a third access tier named “Archived” which can be set at the blob level. This is mainly used to archive data and here the storage costs are lower than the cool tier and the access costs are higher than the cool or hot tier.

Azure storage Archive access tier

If we select an “Archive” access tier then the blob won’t be enabled until we revert the access tier to hot or cool and this operation might take several hours.

Replication

Azure storage provides four replication options. I am excluding two additional ones which are still in “preview” mode.

Azure storage replication
  1. Locally-redundant storage (LRS)
  2. Zone-redundant storage (ZRS)
  3. Geo-redundant storage (GRS)
  4. Read-access geo-redundant storage (RA-GRS)

Let’s see in more details each option.

Locally-redundant storage (LRS)

Azure storage replication LRS

This is the basic option and also the most cost-effective one; by default the data are physically replicated in three different storage, belonging to the same data-center for a given region. The advantage is that if one storage goes down then we can still have access to our data via the other two storage. Data is replicated synchronously three times within the same data-center.

Zone-redundant storage (ZRS)

Azure storage replication ZRS

With this option, our data are stored in three different data-centers, so if one data-center goes down then our data are still accessible from the other two data-centers. Data is replicated synchronously across three Azure availability zones.

Geo-redundant storage (GRS)

Azure Storage replication GRS

The data are stored in two different data-centers from different regions. The data is only accessible from the master storage and only when the master goes down then Azure will redirect the access to the data from the other region. Data is replicated synchronously three times in the master region, then replicated asynchronously to the secondary region. This is the most reliable and also the most expensive option.

Read-access geo-redundant storage (RA-GRS)

This is very similar to the GRS option but with RA-GRS data can be read from master or secondary region as well.

References

--

--

Rocco Scaramuzzi
rocco.tech

Tech Lead, Technical Architect, Coder, Senior Software Engineer