PILLAR 1: COST OPTIMIZATION
Welcome back to Azure’s Well-Architected Framework (WAF) blog series. The goal of this series is to provide you with an overview of useful insights and practical steps you can take to implement the five pillars of the Well-Architected Framework and improve your existing cloud environment or properly plan for incoming cloud workloads.
In part one we introduced the five pillars of architectural best practices for cloud workloads:
- Cost Optimization – Managing costs to increase the value produced
- Operational Excellence – Operational processes which keep a system operating in production
- Performance Efficiency – The system’s ability to adapt to changes in load
- Reliability – The system’s ability to recover from failures and continue to operate
- Security – Protecting applications and data from any threats
In part 2 we take a deep dive into the first pillar; Cost Optimization.
WHY COST OPTIMIZATION?
The Microsoft Azure Portal is based on the consumption model where you pay for what you use, so optimising your estate can have a huge impact on your monthly spending. Your application should be elastic, scaling out (and in) to meet service needs. As resources are available on-demand, the model of over-provisioning is unnecessary in the cloud.
The workload should be navigated by well-established business goals and a return on investment (ROI). The principles of cost optimization are a series of considerations which help achieve the business objective(s) and cost.
Six Key Features to Optimize cost
The following lists key principles and features to follow and the tools to use for cost optimisation:
- Leverage Azure budgets setting limits which align with your cost model.
- Build workloads to be scalable which will allow you to conserve costs since cloud economics is built upon a “pay for what you use” model.
- Utilise Azure Reservations (where relevant) on virtual machines and other resources and extend your Enterprise Agreement licensing using Azure Hybrid Benefit for Windows Server, SQL server and Linux.
- Avoid over-provisioning using only what you need and scale out to meet demand using autoscale on Azure.
- Choose the right resources and size your infrastructure accordingly. Utilise Platform as a Service (PaaS) and select Virtual Machine (VM) size based on actual usage. Doing so will help you get the most out of your investment in Microsoft Azure.
- Monitor and optimize your workload. Don’t deploy and forget about your application or workload(s). Make sure you review your architecture and reduce costs by adopting newer cloud offerings. Use Azure Advisor to get recommendations on how to optimize cost.
DEVELOP A COST MODEL
Cost modelling is an exercise where you create logical groups of cloud resources which are mapped to the organisation’s hierarchy and then estimate costs for those groups. The goal of cost modelling is to estimate the overall cost of the organization in the cloud. The principle of rent vs buy, rent (pay-as-you-go) and buy (reserved Virtual Machine instances), applies to compute and any other cloud service. Use Azure’s Total Cost of Ownership (TCO) and the Azure Pricing Calculator to estimate your initial and operational costs. Once you understand how your workload will operate in Azure; establish policies, budgets and controls specified cost limits for the workload.
You can use separate subscriptions for different business units for billing purposes, for example Technology, Marketing and Finance subscriptions. Tagging can also be used to accomplish similar visibility and distinctions between departments.
Use this list of links as your central reference for implementing six key steps to developing your cost model:
- Understand how your responsibilities align with the organisation. Relate the organisation’s requirements to logical groupings offered by cloud services. By doing this the business leaders of the organization get a transparent view of the cloud services available and how they’re managed.
- Capture clear requirements. Begin your planning with a detailed analysis of requirements. Ensure the needs of the stakeholders are addressed. To guarantee a strong alignment with business goals, these areas must be defined by the stakeholders and shouldn’t be organized by the vendor.
- Define the cost constraints, for example, budgets for each business unit, boundaries for scale, redundancy and performance against cost. Also assess the limits for security, as premium cloud security can drive up the cost.
- What are the trade-offs? What is most important for the business; lowest cost, no downtime or high performance?
- High-level goals define the functional requirements. For each of those requirements, define metrics to calculate cost estimates accurately. Cloud services are priced based on performance, features and locations.
- Choose a billing model. Consumption-based price – You are charged for only what you use. This model is also known as the Pay-As-You-Go rate. Fixed price – You provision resources and are charged for those instances whether or not they are used.
WHAT’S NEXT?
As mentioned previously you can leverage Azure budgets and you can have Azure alert you when your consumption reaches a defined threshold.
To do this, visit the metrics for each resource used in the workload (VMs, SQLMI, VPN, etc.) and specify the standard thresholds. Create alerts on the baseline thresholds for each metric. Admins and system owners should be alerted when the workload is using the services at capacity. Administrators can tune the resources to target resource sizes (i.e. SKUs) based on the current load.
Alerts can also be set for approved budgets at the resource group or management group scopes. Performance and budget requirements can be balanced through alerts on metrics and budgets. This tuning can and should be automated as much as possible.
So far we have talked about the cost principles of the Well-Architected Framework, developing the cost model and creating budgets and alerts. Let’s now look at a checklist to help optimize costs:
- Review underutilised resources – Azure Advisor
- Continuously improve your costs with cost reviews – Conduct cost reviews
- Use reserved Virtual Machine instances when needed – Azure Reservations
- Use discount prices (Azure Hybrid Benefit) – Azure Hybrid Benefit
- Implement scale in and out policies as workload demands increase/decrease – Autoscale on Azure
- Re-evaluate architectural design choices
UPDATES FROM THE FIELD
Here are some updates from the field regarding the latest features and enhancements of Microsoft Cost Management:
- Azure Cost Management and Billing is now called Microsoft Cost Management and has been added to the M365 admin center to offer a lightweight cost analysis experience for Microsoft 365 billing admins
- Anomaly detection alerts and accuracy improvements
- Viewing cost for child resources in the cost analysis preview
COMING UP NEXT IN THE SERIES…
Part 3 and the final part in the Microsoft Azure Well-Architected Framework series look at the second pillar; Operational Excellence.