Intro to Cost Management in Microsoft Azure

Table of Contents

Overview

This guide is meant to help explain:

  • How Azure subscriptions incur cost
  • Available cost management tools to plan for and monitor your costs
  • How resource reservations and compute savings plans can help reduce cost over the long term
  • Cost management routines and best practices

Pay As You Go Payment Model

By default, when resources are consumed within a subscription, the subscription is charged for a metered amount of services consumed. This is known as the "Pay-As-You-Go" (PAYG) model, where you pay only for the services you use. The price is charged in accordance with Microsoft's Enterprise Agreement with UT Dallas and is billed to the specified department cost centers on a monthly basis. 

The cost of each service and how consumption is measured will be available on the Pricing Table of the specific service. To find the current price of the service you are interested in, visit Microsoft Azure's Pricing Portal.

Estimate Costs Before Deployment

Note: Carefully review your design and estimates before building any resources that could incur costs.

Estimating the cost of an app deployment is a straight forward process if a team already understands their app's system requirements. However, creating an initial design for your project may require translating a list of proposed system requirements into a cohesive set of cloud-based tools. Get input from multiple stakeholders to best understand every user's needs and expectations relating to backups, redundancy, global availability and more. Start small and find Azure services to achieve your application's Minimum Viable Product (MVP), referring to features included in the initial deployment of an application. If additional consultation is needed, submit a ticket to the OIT-ECIS group requesting cloud consultation services.

Estimating Project Costs

  1. Source or create a list of system requirements for your application's MVP.
  2. This may be provided by the application developer, but depends on the demand of the application in the three main areas of cloud: Compute, Storage and Networking.
  3. Research and identify the Azure services that fulfill your application's requirements.
  4. Virtual machines, managed disks, databases, virtual networks and more are available as cloud infrastructure for your app.
  5. Plug identified services into the Azure Pricing Calculator to estimate the monthly Pay-As-You-Go cost of each service.
  6. If a service's configuration seems suspiciously expensive, make sure to verify if the product is designed for your use case and accurately configured to reflect your application's needs.
  7. Consider any potential discounts or cost-saving measures, such as long-term compute commitments or reserved instances.
  8. Azure Pricing Calculator has options to preview cost savings with one or three year resource reservations. Other non-reservable compute, like server-less compute, can be discounted using Savings Plans for Compute.

Options to Reduce Cost

Maximize Free Services

Students are encouraged to register for Azure for Students benefit to learn about Azure and the cloud, launch personal projects and take advantage of a yearly $100 promotional credit.

Every Azure account can take advantage of a free tier subscription where they can use specified amounts of Azure services for free - including 12 months of a Windows VM, Linux VM, 5GB of Blob Storage and alongside various amounts of always free services. Training materials on different Azure roles are available through the Azure Education portal.

Read more about monthly quotas for free services.

Spread Out A VM Workload Over Time (Azure Spot VMs)

Spot VMs are temporarily available VMs that can process an interruptible workload at up to 90% less than pay-as-you-go VMs. By allowing your application to run during off-peak hours for Microsoft Azure process nodes, you can reduce that virtual machine's compute expense by only running on off-peak-usage hours and allowing a price cap on hourly compute. However, the workload must be able to start and stop itself.  

Persistence of the service depends on the max compute price set by the user (optional). Even though this machine is not constantly running, it may be connected to temporary and persistent storage. Best use cases for this include gradual analysis of big datasets or batch processing applications (like video conversion or exporting). Optimize the amount of time this service needs to complete itself to maximize utility of Spot VM service. Often times, a non-interrupted VM will give more immediate results.

Read more about Spot VMs in Microsoft Azure.

Reduced Windows Licensing Fees (Azure Hybrid Benefit)

Subscriptions within the UT Dallas tenant have access to Hybrid Benefit via Microsoft Azure. Hybrid benefits refers to the use of physical licenses for Windows workstations being used for Azure virtual machines. Typically, OS licensing costs are included in the monthly cost of the virtual machine. For UTD organization Windows virtual machines, they are covered under the organization's Hybrid Benefit and can provide a discount on OS licensing from the typical monthly cost of the virtual machine.

Read more about Hybrid Benefit in Microsoft Azure.

Reserve Azure Resources (1 or 3 Year Terms)

Users can save money on Virtual Machines, Database, and Disk Storage in Azure by committing to reserve a resource over one or three years. Reserved resource instances offer up to 80% savings (depending on term length) compared to pay-as-you-go pricing.

Read more about Reservations in Microsoft Azure.

Stay Flexible and Save on General Compute Costs

Savings Plans for Compute allow users to commit to a fixed hourly spend on compute services for one or three years, providing flexibility and cost savings compared to the Pay As You Go rate. A savings plan covers a range of Azure compute resources instead of a single Azure resource. This includes compute events that do not rely on existing virtual machines. Savings Plans offer up to 60% savings applied across various compute services, including VMs, Azure Kubernetes Service (AKS) and Azure Functions.

Read more about Savings Plans for Compute in Azure.

Combine a Compute Savings Plan With Server-less

Server-less computing can be covered under a Compute Savings Plan. Azure's server-less options, such as Azure Functions and Azure Kubernetes Service (AKS), offer cost-efficiency by running containers at a lower cost than traditional VM hosts. Ideal use cases include microservices, event-driven applications and containerized workloads

Read about more savings options.

Continuously Manage Costs

Cost management is a cycle of ongoing monitoring, analysis, and optimization to ensure that cloud spending aligns with budgetary constraints and business goals. By continuously managing costs, you can identify opportunities for savings and avoid unexpected expenses.

In Azure, the Cost Management portal allows your organization to:

  • Track Spending and Cost Drivers: Monitor real-time and historical spending across your Azure resources. Identify which services and resources are driving costs.
  • Set Budgets and Alerts: Establish budgets and receive notifications when spending approaches or exceeds predefined limits.
  • Optimize Resource Usage: Get recommendations for optimizing resource usage based on your consumption patterns.

Cost Management Best Practices

Grow your cloud usage iteratively with a yearly cost management cycle using phases of Optimization, Visibility & Accountability:

Optimization

  • Get feedback from stakeholders on project specs and make a judgement on what will remain necessary resources into the future
  • Increase efficiency of compute utilization using cloud-optimized solutions and reduce metered consumption
    • Minimize service runtime and clear unused resources
      • Auto-shutdown/scaledown
        • Power down after hours
        • Use less servers when demand is low
      • Serverless products over hourly VMs and persistent services
      • Spot VMs for interruptible workloads
      • Removing unused storage or networking appliances
  • Plan for the most cost effective way to deploy each resource in the cloud over the next year.
    • Combine and leverage all available cost savings tools available from Microsoft
      • Set appropriate scope for Reservation and Compute Savings Plan coverage.
      • Request separate Dev/Test subscriptions for low-cost secondary environments.

Visibility

  • Clearly name and tag resources
  • Regularly review spending via Cost Analysis
    • Have an accountable team members track cloud spend every week 
    • Use Azure Advisor to find and get notified about cost optimization recommendations and other solutions.
  • Set up budget overage and cost fluctuation alerts
  • Exporting expense data into external dashboards and reports.

Accountability

  • Maintain an active cost management routine.
  • Accountable team leaders should take charge of:
    • Scoping projects
    • Contacting stakeholders
    • Managing project budgets
    • Reviewing cost
    • Learning the cost structure of products
  • Always estimate and review costs before deploying.
    • Choose the right size and optimization of VM spec and a balanced cost/feature storage solution to avoid paying for underused features.
    • Ensure you acquire funding to test functionality of resources before deploying and make sure to delete resources built after testing.