DEV Community

Cover image for Azure Data Storage: Optimizing Your Options
Gilad David Maayan
Gilad David Maayan

Posted on • Updated on

Azure Data Storage: Optimizing Your Options

Storing data in the cloud is quickly becoming the default for modern businesses. Azure, one popular provider, is currently serving 95% of Fortune 500 companies. With cloud storage, you can gain processing power, data security, and data availability that would be too costly to maintain alone.

These benefits can come at a significant cost. Particularly as your data storage needs grow. Managing cloud storage and its associated costs is something that you should not overlook. At least not if you want to ensure a good return on your cloud investment. Read on to learn what storage options are available in Azure, and how to optimize your data storage.

Azure Storage

Azure Storage covers a range of services for all data types. All services are accessed through your storage accounts. Azure Storage services are scalable, durable and highly available with redundant storage. These services come with built-in options for encrypting your data.

With Azure, you can access your data via HTTP or HTTPS. Storage services include support for .NET, Java, Python, Ruby, PHP, Go, and a REST API. You can run custom scripts on services through Azure PowerShell or the CLI.

You also have the ability to take advantage of fully integrated third party services which provide functionality for Azure file storage, data sharing, and file caching. These services cost extra, but can provide additional benefits, such as on-premises coverage or full system management.

The primary Azure storage services are:

Azure Blobs
Blobs is an object storage service for unstructured data, such as text and binary data. It is used for serving files to a browser, storing files for distributed access, streaming video or audio, storing backup and recovery data, and storing data for business intelligence purposes.

Azure Files
Files is a managed file storage service for cloud or on-premise systems. It enables you to set up highly available network file shares. You can access shares via the Server Message Block (SMB) protocol. Files grants multiple VMs shared read/write access.

You can use Azure File Storage for on-premise applications, storage of configuration files, tools or utilities, and storage of data for analysis, such as logs or metrics. However, Files doesn’t support Active Directory-based authentication or Access Control Lists (ACLs). Instead, it employs Shared Access Signature (SAS) tokens that you can use to allow time-limited access to files.

Azure Queues
Queues is a service used for storing messages used for communication between application components. It is used to enable individual scaling of tasks through asynchronous processing.

Azure Tables
Tables is a NoSQL storage service for schemaless, structured data. It is part of the Azure Cosmos DB service. You can access data stored in Tables through authenticated calls from within Azure or from external services. Tables is used for storing user data for web applications, address books, device information, and other types of metadata.

Disk Storage
Disk Storage is a service providing managed Virtual Hard Disks (VHDs). These disks operate the same as on-premise hard drives. With Disk Storage, you store data in page blobs, which are random IO storage objects. When using this service, you only provision the disks you need. Azure manages the disks’ maintenance and resource use.

Tips for Optimizing Azure Storage

How you optimize your Azure Storage services will depend on the type and amount of data you need to store. Your performance requirements will also play a role. Despite these variations, the following tips can help optimize most systems.

Clean Up Your Disks
In Azure, storage disks for your Virtual Machines (VMs) will remain unless you manually delete them. Disks are not automatically deleted when you delete a VM; they are simply detached. These disks are designed to persist in order to protect you from accidental data loss. To delete these orphaned disks, you should locate any ownerless or unattached disks through Storage Explorer or the portal. You can also use scripts to report any unattached disks.

During your search, pay attention to VHD containers, created by Azure and placed into blob storage. When you delete VMs on managed disks, Azure will bundle unattached disks into these containers. It is important to check under both your managed and unmanaged storage services. Before deleting any disks you locate, be sure to check that the data they contain is truly unneeded.

Manage Your Databases
In Azure Storage, each SQL database gets its own resource pool. You are charged for these pools even if your database remains idle. To avoid these idle costs, you can maintain a SQL server on a dedicated VM. This likely mirrors the set-up that you used before moving to the cloud. The downside of this solution is that you won’t benefit from the built-in high availability, geo-replication, or point-in-time restoration features of Azure.

An alternative option is to use SQL elastic pools. These pools enable you to reserve a number of resources to be shared across databases. To set up pools effectively, you need to evaluate database Database Throughput Unit (DTU) usages. DTU is based on a combination of CPU, memory, and read/write usage.

Databases with low DTU, below 40%, are good candidates for combination. If you have one database that’s using a lot of resources, however, it might be better to create multiple pools with custom use tiering. Having two pools, one for a high use database and one for the rest can still save you money while ensuring performance.

Optimize Your Backups
Azure employs a system of incremental backups to store your data. This means that the first time you backup your data, a full copy is made. Each subsequent time, only blocks which have changed since the last backup are addressed. Using incremental backups reduces the overall size of backups to be stored by referencing previously stored data.

Although incremental backups use less storage than traditional backups, it is only efficient if you manage the backups consistently. Your storage is not optimized if you have backups stored in multiple places or are keeping backups that include redundant files.

When you need to keep full backups of particular databases or files, be mindful of how many copies you are storing. If you are keeping these backups for regulatory purposes or “just in case”, consider moving them to archive storage. Archiving files is often significantly cheaper than keeping them in an active storage.


Storing your data in Azure can provide you with substantial benefits, like scalability and high availability. Unfortunately, these benefits can come with a hefty cost. To help minimize your costs without losing on the positive aspects, carefully evaluate your data and your storage options. Then balance the cost of storage with the value of your data.

Discussion (0)