There are four kinds of storage account in Azure and it can be hard to decide on which one to use. This post will explain how to pick a storage account type in Azure.
The Storage Services
There are several storage services in Azure. It is important to understand what these are before we start discussing storage accounts.
First, let’s ask if you need a storage account at all! Azure offers managed disks as a new way to create virtual machine storage. A managed disk is … managed by Azure on your behalf. It handles the placement to guarantee high availability and performance and you get additional functionality. With Managed Disks, you do not need to create a storage account/container to store the disks. All the work is done under the covers for you. The managed disk is my choice when creating a new virtual machine. There are a couple of minor gotchas today:
You cannot move managed disks to another resource group or subscription. This will be fixed soon by Microsoft but there is a workaround that requires you to rebuild the virtual machine (no data, identity or application/settings loss).
If you wish to use Azure Site Recovery (ASR) for on-premises to Azure disaster recovery, you must use a storage account to store the replicated disks.
Now for the storage account services. There are five of them, which are automatically selected by Azure for the data you are using. Each has its own billing rate:
Blob: The term blob comes from databases, where a binary large object (file) can be stored in a database. An Azure storage cluster can be viewed as a gigantic multi-master database. Files can be stored in containers (folders) at very low costs. This makes Blob storage ideal for backup, tiered storage (Azure StorSimple), and big data uploads (before processing/ingestion). Note that Blob is used under the covers by Azure Backup in most situations.
Files: Azure Files allows you to create a very simple share that does not understand NTFS permissions today (but it can store them). Files originally was a way to replace a file server for shared data/configuration storage when migrating a legacy application to Azure virtual machines. The file server was replaced by an Azure Files share. Today, Azure Files is also used by Azure File Sync, where Azure can sync folders/files between many file servers. It also offers seamless tiered storage for those folders/files.
Queue: A queue in a storage account allows software developers to queue up items to be processed. A process can pick the next item in the queue, do something to it, and probably store the results in a database such as Azure SQL or Cosmos DB.
Page Blob and Disk: This is the old method of storing virtual hard disks in Azure, which also appear in a container in Blob storage.
Table: This is a form of NoSQL storage, where tables can be stored without a database management system.
One might be using managed disks for virtual hard disk storage but you will probably need a storage account. If you want to be able to monitor or troubleshoot virtual machines, a storage account will be required:
Diagnostics Settings: Guest OS performance metrics are stored as table storage.
Boot Diagnostics: A small bitmap image is stored and regularly updated, depicting the “console” of the virtual machine. You can view this image in the Azure Portal to see the current console status of a virtual machine, e.g. what was a “blue screen” but it more of a “sad face screen” these days.
Blob Tiering
Yes, there is more to understand! Blob storage has a feature called tiering which is in three of the four storage account types. There are three tiers of blob storage, each with different costs.
Hot tier: This tier is intended for regularly accessed blobs and has a low access rate charge. However, this tier has the most expensive per GB storage charge, which is actually quite low!
Cool tier: The cool tier is intended for rarely (under twice per month, maybe) accessed blobs. It has a lower per GB storage charge than the hot tier.
Archive tier: Some data needs to be kept and almost never, if not never, be accessed. The archive tier is for this kind of data that must be retained and has the lowest per GB storage charge. However, data cannot be accessed in the archive tier and must be hydrated to either the hot or cool tiers.
Blob tiering is useless to you unless:
You manually move blobs between tiers. Remember that virtual hard disks are not stored as blobs (Page Blob and Disk)!
The application that you write/purchase understands how to move blobs between tiers.
Cool Blob Storage Account
This storage account can only store blobs. There are no Azure Files, Queue, Page Blob and Disk, or Table storage services. A cool blob storage account has a default storage tier of cool. Any blob that is stored here goes into the cool tier. However, you can move a blob between hot, cool, and archive within this storage account.
Hot Blob Storage Account
This is very like the cool blob storage account; it can only store blob data. But unlike the cool blob storage account, it uses the hot tier as the default tier. And any blob can be moved between hot, cool, and archive within the storage account.
General Purpose v2 (GPv2) Storage Account
This is the newest of the four types of storage account. This supports all of the storage services: Blob, Azure Files, Queue, Page Blob and Disk, and Table. It also supports blob tiering. You can select a default hot or cool tier.
General Purpose v1 (GPv1) Storage Account
This is the oldest of the storage account types, which was once simply known as a storage account. It supports all of the storage types: Blob, Files, Queue, Page Blob and Disk, and Table.
However, there are two major things to note:
No Blob Tiering: The Blob service does not offer any tiered storage and has its own billing rate known as Standard IO – Block Blob.
Access Charges: The access charges of the GPv1 Blob service are the lowest of the four storage account types for “hot” data.The access charges for GPv2 are up to 125 times more expensive! The theory is that if you use blob tiering, then you can offset that with lower per GB charges.
Which to Use?
I’ll try to make this simple, but this won’t cover all scenarios:
Virtual machines: If you want (and you should) to enable Diagnostics Settings (table) and Boot Diagnostics (blob), then you should use GPv1. Note that these days, you typically should use managed disks which are not placed into a storage account.
Azure Site Recovery: The advice from the ASR team is to stick with GPv1 for the lower access charges when implementing a DR solution.
Custom-written application: If you can write your own blob tiering system, then use Hot, Cool, or GPv2 (the latter if you will use services other than Blob).
Not sure? Stick with GPv1. You can always upgrade (1-way only) to GPv2 if you find that you need blob tiering.