The cloud service providers charging the cloud customers to pay for the resources they bought, whether they use them or not. They provides organizations high availability, scalability clouds and lower IT costs by only charging for the resources that organizations use.
Resources charged by the cloud service providers are
- Virtual machine / compute instances
- Storage systems
- Data transfer between in and out of the cloud network
- Monitoring resources for the entire cloud
Cloud cost optimization is the process of reducing your overall cloud cost by implementing best practices and this blog covers the factors affecting the cloud cost and the tools available for estimating the cost and techniques to achieve cost optimization in the Azure Cloud.
There are free web-based cost estimation tools available to estimate the costs before deploying services on Azure and to help the customers to compare their on-premises environment/datacenter costs with the same workloads on Azure.
The tool which will help to get visibility into the costs that are accruing in the cloud where resources deployed and running are called Cost Optimization tools.
The high-level factors which are affecting cloud cost are depicted in the below diagram
The techniques which can be implemented in the Azure cloud for cost optimization is given below
- Using Azure Reserved instances
- Bring Your Own License – Hybrid benefit
- Azure Dev/Test Pricing
- Using Azure Cost Management Tool
- Using Right-sized VMs / Storage in infrastructure
- Using AKS in place of virtual machines
- Identify and remove unused disks
- Implementing Elasticity at all levels
- Automation of storage tiering
- Choosing low-cost locations/regions
- Deallocating VMs during non-business hours
- Moving to PaaS or SaaS from IaaS
- Using SQL server Developer edition for Dev/Test
- Monitoring resources and review at regular interval
Using Azure Reserved Instances
Azure Reserved Instances (RI), are the virtual machines that have been reserved on Microsoft Azure’s Public IaaS cloud for dedicated use on a one-year or three-year basis.
Reserved instances are the best choice for steady and predictable usage. They can help to save significantly on virtual machines compared to on-demand instance pricing.
Organizations can reserve virtual machines in advance and can save up to 72 percent of the original cost. One-year and three-year plans are available for Azure reservations which help to save money. Reservation provides a discount in the billing rate and it will not affect the resources which are in running the state like spot instances. Payment can be made for a reservation upfront or monthly.
Azure Hybrid Benefit (AHB) is a program that allows the customer to use their current on-premises Windows Server and SQL Server license on an Azure cloud environment. It is a discount program that could save 85 percent when running virtual machines in Azure, thereby reducing the costs associated with cloud computing. The final cost savings depend on location, usage, and other factors.
Advantages of using AHB:
- 180 days of dual-use rights (during the migration period between the cloud and on-premises)
- Using Windows Server license in the cloud
- Usage of SQL Server license in a platform-as-a-service (PaaS) environment
- Azure reserved instances(RI) with the AHB program together can result in discounts of up to 80%
Azure Cost Management Tool
Cost Management is a free tool that comes with the Azure portal. It collects data and enables analysis that can help to save costs on Azure services. Azure provides additional tools for cost planning and optimization. It helps to track resource usage and expenditure for Azure alongside other clouds. Azure Cost Analysis tool helps to break down the details of Azure spend across your resources.
Azure budgets tool enables you to set budget, oversee the spending, and warn if there is overspend for any given time.
Azure Advisor is a tool that analyzes Azure configurations and provides practical, tailored recommendations on Availability, Security, Performance, and Cost. Implementing the advisor recommendations will help in optimizing the resources and maximize value for money.
Deallocate Virtual Machines When Not in Use
The virtual machine workloads (non-prod/dev environments) would be used only during the week-day office hours. But if they are running all the hours every day, it is kind of wasting money. These virtual machines can be shut down when not in use (during non-business hours and weekend days). The computation costs would be very much saved when these virtual machines are deallocated. The auto-shutdown feature is available with the virtual machines which can be configured for the automatic shutdowns of VMs to save compute costs.
Low Cost Locations and Regions
The Azure products, services, and resources costs vary across locations and regions. Customer needs to analyze and make a decision on choosing the resources from locations and regions where the cost of the resources/services are less.
Few specific resources are billed based on outgoing data traffic volume(egress flow). Customers need to try their best that they are choosing the resources/services which are available in the same region so that they can reduce the egress traffic between the resources.
Cost optimization in Azure cloud is not a one-time process instead it would be a continuous improvement process. By implementing the best practices given in this blog and implementing the possible recommendations given by the cost management tools like Azure advisor, Azure cost analysis will help to reduce the monthly bill to a greater extent.