The Microsoft Digital team is actively pursuing Microsoft Azure cost optimization to enhance the efficiency and effectiveness of the enterprise Azure environment both internally at Microsoft and for its customers.
The team has created a cost-efficient model by implementing data-driven cost-optimization techniques, establishing centralized governance, and driving modernization initiatives across their Azure infrastructure. This environment, one of the largest enterprise setups on Azure, is a valuable example from which all customers can learn strategies to reduce their Azure costs.
The journey towards digital transformation began in 2014 with the decision to migrate on-premises infrastructure to Microsoft Azure, driven by the desire to leverage the benefits of a cloud-based platform—specifically agility, elasticity, and scalability. Since then, the team has progressively migrated and transformed its IT landscape into the largest cloud-based infrastructure globally, with over 95 percent of IT resources hosted in Microsoft Azure.
Over time, the Microsoft Azure platform has expanded significantly, introducing hundreds of services, dozens of regions, and numerous improvements and features. Concurrently, Microsoft has increased its investment in Azure as the primary platform for business solutions. As the Azure footprint has grown, so has the complexity of managing and optimizing Azure expenditures become a focal point.
Optimizing Microsoft Azure cost internally at Microsoft
Their Microsoft Azure footprint mirrors the resource usage patterns typical of large-scale enterprises. Over recent years, their efforts in cost optimization have become increasingly targeted, aimed at mitigating the growing total cost of ownership in Azure, driven by factors such as heightened migrations from on-premises environments and business expansion. This sharpened focus on optimization prompted investments in tools and data analytics tailored for cost efficiency within Azure.
At the heart of their cost-optimization strategy lie the built-in tools and data provided by Microsoft Azure. Leveraging resources like Microsoft Azure Advisor, Microsoft Azure Cost Management and Billing, and Microsoft Azure Monitor, they derive comprehensive insights and tools for optimizing expenditure. Furthermore, they have implemented design refinements based on contemporary Azure resource capabilities. Recommendations sourced from Azure Advisor across various service categories are integrated into their IT service management system, enabling service owners to monitor and manage the implementation process effectively.
Understanding holistic optimization
As a pioneer and the largest adopter of Microsoft Azure, they have developed leading practices for engineering and maintaining Azure environments that prioritize cost-efficiency and a holistic approach to leveraging cloud computing benefits. They conceptualized and refined the Microsoft Well-Architected Framework, which serves as guiding principles for modernizing Azure workloads and setting standards for Azure engineering practices.
Within the Well-Architected Framework, cost optimization is one of five essential components that collectively ensure a streamlined and effective Azure footprint. The other pillars encompass reliability, security, operational excellence, and performance efficiency. Emphasizing cost optimization in Azure goes beyond mere expenditure reduction; it involves optimizing resource usage within Azure's pay-as-you-go model, ensuring resources are utilized efficiently and effectively as per demand. This approach forms the foundational step toward achieving overall optimization within Azure.
Optimization through modernization
Reducing dependency on legacy application architecture and technology was a crucial aspect of the initial efforts in cost optimization. Many workloads were migrated from on-premises to Microsoft Azure using a lift-and-shift method, which involved imaging servers or virtual machines exactly as they existed in the data center and migrating those images into virtual machines hosted in Azure. Moving forward, the focus has been on transitioning these infrastructure-as-a-service (IaaS) based workloads to platform-as-a-service (PaaS) components in Azure to modernize the infrastructure on which the solutions run.
Focus areas for optimization
The focus has been optimizing resources by ensuring correct sizing for IaaS virtual machines and transitioning to a more PaaS-dominated infrastructure, now operating at an 80 percent PaaS to 20 percent IaaS ratio. This shift involves moving workloads to modular services like Microsoft Azure App Service and Microsoft Azure Functions, which offer better optimization capabilities. Automating scalability and elasticity across PaaS services has been key in cost optimization. Additionally, efforts have concentrated on modifying scaling, size, and data retention configurations for Azure storage services such as Microsoft Azure Storage and Azure Cosmos DB.
Implementing practical cost optimization
Microsoft Azure Advisor provides recommendations at the individual service level, such as Azure Virtual Machines, but implementation often occurs at the application or solution level. Application owners are responsible for managing these recommendations to ensure continued operation, address dependencies, and maintain business operations within the appropriate business group at Microsoft.
For instance, after migrating on-premises virtual lab services to Azure using IaaS-based virtual machines with nested virtualization, increased adoption made management difficult. The engineering team re-architected this solution to a PaaS model using microservices and Azure-native capabilities, making it more scalable, efficient, and resilient, while reducing costs by over 50 percent.
In another case, an application using Azure Functions with the Premium App Service Plan was optimized by converting to Durable Functions and efficient function-chaining patterns. This reduced execution time and allowed a switch to the Consumption tier, cutting costs by 82 percent.
Governance
Effective identification and implementation of recommendations require robust governance in cost optimization for applications and the Microsoft Azure services they use. A centralized governance model ensures control and coordination of all cost-optimization efforts, comprising several key components:
Microsoft Azure Advisor Recommendations and Automation: Advisor cost management recommendations form the basis of optimization efforts. These recommendations are integrated into the IT service management and Microsoft Azure DevOps environments to track and ensure effective implementation.
Tailored Cost Insights: Dashboards have been developed to identify the most expensive applications and business groups, highlighting opportunities for optimization. These dashboards empower engineering leaders to monitor important Azure cost components within their service hierarchy for effective optimization.
Improved Microsoft Azure Budget Management: Azure budget planning is conducted using a bottom-up approach involving finance and engineering teams. Open communication and transparency are crucial, with forecasts for the year tracked alongside actual spending to allow accurate adjustments and close monitoring of budget targets. Easily accessible spending data helps identify anomalies and control unintentional spending from unnecessary resource scaling or allocation in complex environments.
Implementing a governance solution has led to significant savings across the Azure footprint. For example, converting Microsoft Azure SQL Database instances from the Standard DTU-based tier to the General Purpose Serverless tier using a simple Microsoft Azure Resource Manager template and auto-pause capability reduced costs by 97 percent.
Benefits of Microsoft Azure
Ongoing optimization in Microsoft Azure has allowed the company to capture Azure's value, helping to increase revenue and grow the business. Despite hosting most IT resources in on-premises data centers in 2014, the yearly Azure budget has remained almost static while the company has grown by more than 20 percent.
Recent optimization efforts have significantly reduced spending across various Microsoft Azure services. Examples include:
Right-sizing Microsoft Azure Virtual Machines: More than 300 recommendations for VM size changes, including switching to burstable VM sizes, led to a 15 percent cost savings.
Moving Virtual Machines to Latest Generation Sizes: Transitioning from older D-series and E-series VM sizes to their current counterparts resulted in nearly 2,500 recommendations and approximately 30 percent cost savings.
Implementing Microsoft Azure Data Explorer Recommendations: Over 200 recommendations were made for Azure Data Explorer optimization, resulting in substantial savings.
Incorporating Cosmos DB Recommendations: More than 170 recommendations for Cosmos DB reduced costs by 11 percent.
Implementing Microsoft Azure Data Lake Recommendations: Over 30 recommendations for Azure Data Lake combined to reduce costs by approximately 15 percent.
Insights
Cost optimization in Microsoft Azure is a complex process requiring significant effort across the enterprise. Key lessons from the cost-optimization journey include:
Implement Central Governance with Local Accountability: A central audit of Azure cost-optimization efforts has improved budget-management processes by identifying gaps and making necessary engineering changes. Centralized governance includes weekly and monthly reviews by leadership to align efforts with business priorities, while service owners remain accountable for their optimization efforts.
Use a Data-Driven Approach: Utilizing metrics and monitoring from Microsoft Azure Monitor is essential to understanding the impact of optimization across services and business groups. Accurate, current data informs timely optimization decisions, maximizing cost savings and preventing unnecessary spending.
Be Proactive: Real-time data and effective cost optimization enable proactive cost management. Recommendations only provide financial benefits when implemented quickly, emphasizing the need for prompt action while maintaining governance.
Adopt Modern Engineering Practices: Cost optimization is a key component of the Microsoft Azure Well-Architected Framework. Implementing modern engineering practices that support reliability, security, operational excellence, and performance efficiency enhances cost optimization. This includes using modern virtual machine sizes and architecting for Azure PaaS components like Azure Functions, Azure SQL, and Azure Kubernetes Service. Staying updated on new Azure services and functionality helps recognize optimization opportunities.
Looking Forward to More Optimization: The focus is refining efforts and identifying new opportunities for further cost optimization. Continued modernization of applications and solutions aims to reduce costs across the Azure footprint. Efforts include using optimal Azure services, building automated scalability, and reducing investment in IaaS components by adopting serverless and containerized workloads.
Additionally, improving methods for decentralizing optimization recommendations allows engineers and application owners to make informed choices while adhering to central governance. This includes automating the detection of anomalous behavior in Azure billing using telemetry, logging, data-driven alerts, root-cause identification, and prescriptive guidance for optimization.
Azure optimization is a continuous cycle. As efforts are refined, lessons from past experiences inform future improvements. The Azure footprint will continue to grow, and cost-optimization efforts will expand to capture every benefit the platform provides.