Over the last 5 years or so, many organizations have moved their infrastructures and additional resources to Microsoft Azure. According to InfoClutch, over 280,000 companies use Azure worldwide, which made cloud costs (and their optimization) a large part of most businesses’ IT budgets.
There are various built-in pricing models to help you with your Azure cost management and numerous tools to assist you with optimizing your budget, but the process of focused cost optimization that can truly make a difference comes with experience and expertise. Reducing waste and unnecessary overheads can come in handy when you seek new ways to maximize your utilization of existing resources.
In this blog post, we’ll tackle seven cost-saving best practice options that can help you make the most out of your Microsoft Azure architecture and optimize your monthly spendings.
1. Move to Elastic Databases (from Traditional Database Servers)
Running MS SQL or other database servers on Azure can turn into quite an expensive perk, and the increase in costs can happen rather quickly. Virtual Machines could be expensive, while database instances are often not utilized in an optimal way, which makes database VMs inappropriate and not the most straightforward way to distribute loads between instances, especially if you are looking to cut your overall Azure costs.
This is why transitioning to PaaS is the best solution for many organizations. Most companies that move to the Azure SQL service report a substantial reduction in costs. This reduction is mainly due to a more dynamic payment method in which you are paying only for the database resources you are actually using at that given moment, allowing for the cost-effectiveness on a more granular level.
Best Practice Tip: Use SQL Elastic Pools
Using SQL elastic pools beats the practice of reserving a certain amount of resources for a single database instance as the utilization of this model allows you to reserve a number of resources that can be shared across hundreds of databases. SQL elastic pools provide all the advantages of Azure SQL while enabling you to handle spikes in usage patterns across multiple databases more effectively. This solution has proven to be very reliable and popular among businesses with multi-tenanted applications.
On the other hand, in a scenario where you have a database with dramatically higher usage compared to other databases in your elastic pool, you may need to purchase a more expensive elastic pool tier so it can properly withstand usage peaks. In this situation, the most cost-effective solution is to take the high-usage database out of the pool by splitting it out into single database offerings. This will allow you to pay for a less expensive elastic pool tier you will use for low-usage databases.
We recommend you to check the database DTU usage and if you notice that a single database has 40% or more of usage in your DTUs at any given time, it almost certainly means that there’s room for a significant saving in costs. However, as DTU can be somewhat unreliable, we highly suggest checking the database metrics regularly to make data-driven choices accordingly.
Best Practice Tip: Use Serverless Azure SQL
This single database compute tier in Azure SQL Database is designed to automatically scale the computing power and usage according to the workload demand. Serverless databases bill their users for the amount of computing power used per second, while it can also automatically pause the database when inactive and resume activity when necessary, during which periods you only pay for storage.
2. Use Storage Tiering
Since storage is often among the largest portions of ongoing Azure costs, optimizing this aspect of Azure deployment can bring significant reductions in overheads.
Azure Blob Storage model offers Premium, Hot, Cool and Archive storage tiers, each with appropriate pricing per GB a month. Using the right storage tier for the right type of data can be very cost-effective.
For example, storing the data you access less frequently on a lower-cost tier is a good automation practice as it decreases monthly costs and allows a substantial cost reduction in the long run.
3. Shift Workloads to Containers
Containers account for a more lightweight workload architecture when compared to VMs. Depending on your workflow and resources, businesses can run numerous containerized applications on a single physical host, and in certain cases manage dozens of containers per host. Companies that repackage their applications as containers are able to reduce the utilization of virtual machines and therefore reduce costs even further.
An important caveat to address here is that, in certain scenarios, shifting workloads to containers could actually increase your costs. We recommend contacting our Azure experts to consult about best container-based practices for your unique project(s)
4. Delete Unused Virtual Disks
With Azure, virtual disks are not automatically deleted when you delete a virtual machine. Instead, they continue to bump up your costs. We recommend locating and deleting unused virtual disks via Azure portal Disks screen where you can identify all your active managed virtual disks located in your current storage account. Check out the owner for each virtual disk and if it is empty, it is not being used by any VM, which means it can potentially be deleted.
5. Right-Size Your VMs for Best Performance
Azure’s VMs come with various different hardware and performance capabilities, which is why it is crucial to find the optimal VM for your workload so it provides adequate throughput and maximum performance at the lowest cost rate. Once you find the best combination be sure to stick with it and utilize auto-scaling for automatically adjusting the number of VMs according to actual workloads.
Though it is not always feasible, try to achieve (or get close to) 100% VM utilization as that way your VM costs are optimal. To get close to maximum VM utilization, we recommend monitoring your metrics using Azure Monitor, as well as using auto-scaling to add/delete machines according to your current utilization percentage.
6. Track Performance of Application Dependencies
Aside from the SQL server, it is highly likely that your app uses queues/caching, makes web service calls, or uses other dependencies and Azure features like CosmosDB, Azure Storage, etc.
Azure Cache for Redis is a great feature as it enables superior throughput and latency performance. It does so by storing your data in memory rather than on disk. The performance is very consistent and fast in terms of reading/writing as it processes requests within single-digit milliseconds allowing for the delivery of exceedingly fast cache operations and high scalability of data tiers according to the app’s load.
Microsoft Azure Service Bus is another option to consider. It is a fully managed enterprise integration message broker that can decouple applications and services, offering a reliable and secure platform for asynchronous transfer of data and state. Service Bus uses messages to transfer data between apps and services.
We recommend ensuring that all of the aforementioned dependencies and features are scaled well and are performing in an optimal manner.
7. Create VM’s Start/Stop Schedule Based on Usage
Although this practice seems to be simple enough, we recommend performing a thorough analysis of usage patterns and availability, according to which you will be capable of creating an optimized start/stop schedule for your VMs.
Autoscaling can also be of great assistance, especially combined with your custom scheduling, as it can provide your Azure infrastructure with added elasticity and – inevitably – increased cost-effectiveness. You can use Azure Automation Runbooks to implement automatic start/stop functions.
This type of scheduling can be quite effective, especially for dev/test environments where there’s no need for the always-on regime. On the other hand, autoscaling in VMSS is an optimal solution for the applications that have to be run on VMs as its embedded mechanism is designed to add and remove instances according to the autoscaling rule.
There are numerous tricks of the trade when it comes to reducing your overall Microsoft Azure costs, but almost all of them depend on your workload, goals, resources, and your mindset. If you still have questions regarding your Azure cost reduction potential, feel free to contact our Azure experts and get the right data first-hand.