Azure Cost Optimization Best Practice Guide
Cost management is a recurring theme at the enterprise level. It is important that all responsible teams review & understand the cost. You can follow the phase-by-phase best practice approach below to optimize the cost of Azure.
At MAQ Software, we have migrated hundreds of applications to Azure. Based on our experience, we have compiled ten best practices to optimize costs for Azure platforms.
Governance & Monitoring
- Inventory & Tagging
- Setup Cost Budget & Alert
- Monitor
Get a list of all Azure resources using Azure Resource Graph for efficient querying, or automated PowerShell scripts.
Perform resource tagging such as Owner, Purpose, Environment, etc., for data enrichment.
Enforce tagging conventions using Azure Policy. These steps will help centralized governance teams to make wise cost management decisions.
Set cost budgets for the resources to proactively manage costs, and to monitor how spending progresses over time.
Notify owners/users if the cost exceeds the set threshold limit.
Visualize data in consolidated or custom dashboards.
Detect spending anomalies and usage inefficiencies.
Review and act if forecast exceed the defined threshold limit.
Perform cost reviews on regular cadence.
Resource Management
- Cleanup
- Automation
- Review Azure Advisor Recommendation
Find unused resources and notify the respective owners.
Clean up idle & orphan resources using Azure Advisor recommendations.
Audit and restrict access on creation of resources.
Schedule Runbooks to pause and start different Azure services such as Azure Analysis Services and VMs.
Setup autoscaling based on the CPU/memory usage metrics.
Setup Azure policy to restrict the resource SKU/location while creating the resource.
Setup cost alerts.
Review Azure Advisor recommendations to identify opportunities to reduce cost.
Act on Azure Advisor recommendations.
Example: Identify virtual machines with low utilization from compute or network usage standpoint and either shut down or resize the machine.
Resize Azure SQL database SKUs based on current load.
Rate Optimization
- Buy Azure Reservations & Savings Plans
- Azure Hybrid Benefits
Identify resources which can be purchased using Azure Reservations for stable workloads (up to 72% savings).
Use Azure Savings Plans for Compute for dynamic or evolving workloads (up to 65% savings).
Pre-payment provides a discount on the resources you use. Reserved instances provide a billing discount and do not affect the runtime state of the resources.
Enable Azure Hybrid Benefits (AHB) for on-premises licenses in Azure.
Use on-premises Software Assurance-enabled Windows Server and SQL Server licenses on Azure.
Infrastructure Optimization
- Resource Optimization
- Solution Optimization
Review correct resource families & Stock Keeping Units (SKUs).
Consider Azure Spot Virtual Machines for interruptible workloads to save up to 90%.
Select proper resource location to avoid unwanted data movements between the datacenters.
Identify suitable service plan (consumption basis, pay as you go).
Review different storage configuration (Premium Solid-State Drives, Standard Solid-State Drives, Hot Tier, and Cold Tier) and plan for data archival.
Review existing architecture.
Identify how data flows in and out of Azure.
Find resource utilization.
Brainstorm to optimize resource instance within teams/environments.
Review individual resource costs.
References
- Azure Well-Architected Framework - Cost Optimization – Microsoft Corporation
- Azure Savings Plans for Compute – Microsoft Corporation
- Azure Reservations – Microsoft Corporation
- Azure Spot Virtual Machines – Microsoft Corporation