AZ-305Chapter 30 of 103Objective 1.3

Cost Optimization Architecture Patterns

This chapter covers cost optimization architecture patterns in Azure, a critical topic for the AZ-305 exam. Approximately 15-20% of exam questions touch on cost management and optimization strategies. You will learn how to design solutions that minimize Azure spending while meeting performance, security, and operational requirements. The exam expects you to choose the right cost optimization tools and patterns for various scenarios, including reserved instances, scaling, and right-sizing.

25 min read
Intermediate
Updated May 31, 2026

The Cloud Budgeter: A Personal Finance Analogy

Think of your Azure subscription as a household budget. You have a monthly income (your budget) and various expenses: rent (compute), groceries (storage), utilities (networking), and entertainment (ancillary services). Without tracking, you might overspend on takeout (unoptimized VMs) and run out of money for essentials. A personal finance app (Azure Cost Management) tracks every dollar spent, categorizes it, and alerts you when you're approaching your limits. You can set spending limits per category (budgets) and get alerts when you exceed 80% (budget alerts). You can also automate savings: turn off lights when not needed (shut down VMs on a schedule), buy in bulk for discounts (reserved instances), or switch to a cheaper brand (use lower-cost SKUs). Just as you might review your subscriptions annually to cancel unused ones (remove idle resources), you review your Azure spend monthly to identify waste. The goal is to get the most value for every dollar, not just to spend less—a cheap but unreliable car (low-cost but poorly performing VM) isn't a good deal if it breaks down (causes performance issues). This chapter will teach you the tools and patterns to become a savvy cloud budgeter, ensuring you optimize costs without sacrificing performance or reliability.

How It Actually Works

What is Cost Optimization in Azure?

Cost optimization in Azure is the process of continuously reducing your cloud spending without negatively impacting performance, security, or reliability. It is one of the five pillars of the Microsoft Azure Well-Architected Framework. The exam tests your ability to recommend and implement cost optimization strategies using Azure native tools and architectural patterns.

Why Cost Optimization Matters for AZ-305

As a Solutions Architect, you must design solutions that are not only technically sound but also cost-effective. The exam will present scenarios where you need to balance cost against other requirements like high availability, disaster recovery, and performance. Understanding cost optimization patterns helps you choose the right services, tiers, and configurations.

Key Azure Cost Optimization Tools

Azure Cost Management + Billing: The primary tool for monitoring, analyzing, and optimizing Azure costs. It provides cost analysis, budgets, alerts, and recommendations.

Azure Advisor: Provides personalized best practices recommendations, including cost optimization suggestions like right-sizing underutilized VMs and purchasing reserved instances.

Azure Budgets: Allows you to set spending limits and receive alerts when costs exceed thresholds.

Azure Pricing Calculator: Helps estimate costs before deploying resources.

Total Cost of Ownership (TCO) Calculator: Compares on-premises vs. Azure costs.

Cost Optimization Patterns

#### 1. Right-Sizing Right-sizing involves matching instance types and sizes to actual workload requirements. Azure Advisor analyzes VM usage over 7 or 30 days and recommends downsizing or shutting down underutilized VMs. For example, if a Standard_D4s_v3 VM consistently uses less than 10% CPU, Advisor might recommend downgrading to Standard_D2s_v3, saving 50%.

#### 2. Reserved Instances (RIs) Reserved Instances provide a significant discount (up to 72% compared to pay-as-you-go) in exchange for a one- or three-year commitment. They are ideal for steady-state workloads. There are three options: no upfront, partial upfront, and full upfront. The exam expects you to know that RIs apply to VM compute costs, not software or storage. They also support instance size flexibility within the same VM family and region.

#### 3. Azure Hybrid Benefit Azure Hybrid Benefit allows you to use your existing on-premises Windows Server and SQL Server licenses with Software Assurance to get discounted rates in Azure. This can save up to 40% on Windows VMs and up to 55% on SQL Server. The exam tests that this benefit applies to both VMs and Azure SQL Database.

#### 4. Spot VMs Spot VMs offer deep discounts (up to 90%) on unused Azure compute capacity. However, they can be evicted at any time if Azure needs the capacity back. They are suitable for fault-tolerant, batch, or test workloads. The eviction policy can be either deallocate or delete. Azure typically evicts spot VMs with 30 seconds notice.

#### 5. Auto-Shutdown and Auto-Scaling Auto-shutdown schedules VMs to stop during off-hours, saving compute costs. Auto-scaling adjusts resource capacity based on demand, preventing over-provisioning. For example, an Azure App Service plan can scale out to 10 instances during peak hours and scale in to 2 during low traffic.

#### 6. Choosing the Right Storage Tier Azure Blob Storage offers hot, cool, and archive tiers. Hot for frequent access, cool for infrequent (30+ days), archive for rarely accessed (180+ days). Moving data to cooler tiers reduces storage costs. Lifecycle management policies can automate tier transitions.

#### 7. Using Azure Savings Plan Azure Savings Plan is a flexible pricing model that offers discounts on compute services (VMs, App Service, etc.) in exchange for a one- or three-year commitment. Unlike RIs, it applies across regions and instance families. The discount is up to 65%.

How Cost Optimization Interacts with Other Pillars

Cost optimization must be balanced with reliability, security, performance, and operational excellence. For example, using a single VM without redundancy is cheap but not reliable. The exam tests your ability to make trade-offs: e.g., choose a cheaper SKU that still meets performance SLAs, or use reserved instances for baseline capacity and spot VMs for bursts.

Configuration and Verification

Set up a budget: In Cost Management, create a budget for a subscription or resource group with a monthly amount and alerts at 50%, 80%, and 100%.

View Advisor recommendations: In Azure Advisor, select the Cost tab to see right-sizing and RI purchase recommendations.

Purchase Reserved Instances: In the Azure portal, navigate to Reserved Instances, select the product, scope (shared or single subscription), and term.

Enable Hybrid Benefit: When creating a VM, under Licensing, select "Already have a Windows Server license?" or use PowerShell: Set-AzVMSourceImage -LicenseType Windows_Server.

Configure auto-shutdown: For a VM, under Operations > Auto-shutdown, set the schedule and time zone.

Create lifecycle management rules: In Storage account, under Data management > Lifecycle management, add rules to move blobs to cool after 30 days and archive after 90.

Common Exam Traps

Reserved Instances vs. Savings Plan: Candidates often confuse the two. RIs are specific to a VM family and region; Savings Plan is flexible across regions and families. The exam might ask which is better for a multi-region deployment.

Hybrid Benefit applicability: Some think it applies to all Azure services, but it's limited to Windows Server and SQL Server.

Spot VM eviction: Candidates forget that spot VMs can be evicted with short notice, making them unsuitable for stateful workloads.

Budget alerts vs. cost alerts: Budgets track forecasted spend; cost alerts track actual spend. The exam expects you to know the difference.

Summary of Key Values and Defaults

Reserved instance discounts: up to 72% (three-year, full upfront)

Azure Hybrid Benefit: up to 40% for Windows, up to 55% for SQL Server

Spot VM discounts: up to 90%

Azure Savings Plan discount: up to 65%

Budget alert thresholds: typically 50%, 80%, 100%

Advisor recommendation period: 7 or 30 days

Auto-shutdown: configurable schedule, default none

Storage tier transition: cool after 30 days, archive after 180 days (lifecycle management rules customizable)

By mastering these patterns and tools, you'll be able to design cost-effective Azure solutions that meet business objectives. The exam will test your ability to apply these concepts in real-world scenarios.

Walk-Through

1

Analyze Current Spend

Start by using Azure Cost Management to analyze your current spending. Navigate to Cost Management + Billing, then Cost Analysis. Group costs by resource type, location, or tag to identify top spenders. Set the time range to the last 30 days to capture recent trends. Look for anomalies like sudden spikes or consistently underutilized resources. Export this data to a CSV for further analysis. This step establishes a baseline for optimization.

2

Identify Optimization Opportunities

Use Azure Advisor to get cost recommendations. Go to Advisor, select the Cost tab. Review each recommendation: right-size VMs, purchase reserved instances, remove unassociated public IPs, etc. Each recommendation includes potential savings. Prioritize based on impact: high-impact recommendations (e.g., right-sizing a large VM) should be addressed first. Also review Azure Cost Management for anomalies and underutilized resources.

3

Implement Right-Sizing

For VMs identified as underutilized (CPU < 5% and network < 7 MB/s for 7 days), resize to a smaller SKU. Use PowerShell: `Resize-AzVM -ResourceGroupName 'rg' -VMName 'vm1' -Size 'Standard_DS2_v2'`. Ensure the new size is available in the same region and availability zone. Test the workload after resizing to confirm performance is acceptable. For SQL Server, consider using serverless or DTU-based tiers if usage is intermittent.

4

Purchase Reserved Instances

For steady-state workloads, purchase reserved instances. In Azure portal, go to Reserved Instances, click Add. Select the VM series, region, term (1 or 3 years), and billing frequency (monthly or upfront). Choose scope: shared (applies to any matching VM in the billing scope) or single subscription. Use Azure Hybrid Benefit if you have eligible licenses. The discount is applied automatically to matching VMs. Monitor the reservation utilization via Cost Management to ensure you're not over-committing.

5

Set Budgets and Alerts

Create budgets in Cost Management to proactively manage costs. Go to Budgets, click Add. Set the scope (subscription or resource group), amount, and time period (monthly, quarterly, or annual). Configure alerts at thresholds like 50%, 80%, 90%, and 100%. Alerts can be sent via email or action groups (e.g., trigger a runbook to shut down resources). This ensures you're notified before overspending.

What This Looks Like on the Job

Enterprise Scenario 1: E-commerce Platform with Variable Traffic

A large e-commerce company runs its website on Azure. During peak holiday seasons, traffic spikes 10x. They use auto-scaling to add VMs during high demand. However, they also have a baseline of 20 VMs running 24/7. To optimize costs, they purchase 20 reserved instances for the baseline (saving 40%) and use spot VMs for the burst capacity during holidays. They also set up auto-shutdown for non-production VMs after business hours. Azure Advisor recommends right-sizing some over-provisioned development VMs. They implement lifecycle management to move old transaction logs to cool storage after 30 days. Result: 30% cost reduction without impacting performance.

Enterprise Scenario 2: Global SaaS Provider with Multiple Regions

A SaaS provider has deployments in US East, West Europe, and Southeast Asia. They use Azure Savings Plan instead of reserved instances because it offers flexibility across regions and VM families. They also leverage Azure Hybrid Benefit for Windows VMs, saving 40%. They set budgets per region with alerts to prevent cost overruns. For their database tier, they use Azure SQL Database serverless for dev/test environments, paying only for compute used. In production, they use provisioned DTUs with reserved capacity discounts. They also use Azure Cost Management to tag resources by department and allocate costs accurately. Common misconfiguration: forgetting to apply Hybrid Benefit to existing VMs, resulting in higher bills. They automate this with PowerShell scripts.

Scenario 3: Media Company with Large Storage Needs

A media company stores petabytes of video files. They use Azure Blob Storage with lifecycle management to automatically move files from hot to cool after 30 days and to archive after 90 days. They also use Azure CDN to reduce egress costs. They set up budgets and alerts to monitor storage costs. They use Azure Storage Reserved Capacity for a 3-year term to save up to 38%. They also compress files before upload to reduce storage and egress. Misconfiguration: forgetting to set lifecycle policies on new storage accounts, leading to unexpected costs. They now use Azure Policy to enforce lifecycle rules.

How AZ-305 Actually Tests This

What AZ-305 Tests on Cost Optimization

AZ-305 objective 1.3: 'Design for cost optimization.' The exam tests your ability to recommend appropriate tools and patterns based on workload characteristics. Key topics:

Reserved Instances vs. Azure Savings Plan: when to use each.

Azure Hybrid Benefit: eligibility and savings.

Spot VMs: use cases and limitations.

Azure Cost Management: budgets, alerts, and cost analysis.

Right-sizing: using Advisor recommendations.

Storage tiering: hot, cool, archive.

Auto-scaling and auto-shutdown.

Common Wrong Answers

1.

Choosing Reserved Instances for variable workloads: Candidates often pick RIs for workloads that change frequently, but RIs require a 1- or 3-year commitment. The correct answer is Azure Savings Plan or pay-as-you-go with auto-scaling.

2.

Applying Hybrid Benefit to all services: Hybrid Benefit only applies to Windows Server and SQL Server. Some answers incorrectly extend it to Linux or App Service.

3.

Using spot VMs for stateful applications: Spot VMs can be evicted, so they are unsuitable for stateful workloads. Candidates might forget this and choose them for databases.

4.

Setting budget alerts only at 100%: Best practice is to set alerts at multiple thresholds (e.g., 50%, 80%, 90%) to allow time for action.

Specific Numbers to Memorize

Reserved instance discount: up to 72% (3-year, full upfront)

Azure Hybrid Benefit: up to 40% for Windows, up to 55% for SQL Server

Spot VM discount: up to 90%

Savings Plan discount: up to 65%

Advisor recommendation period: 7 or 30 days

Storage tier transition defaults: cool after 30 days, archive after 180 days (customizable)

Budget alert thresholds: commonly 50%, 80%, 100%

Edge Cases

Reserved Instance exchange: RIs can be exchanged for another RI of the same type (e.g., VM size) but not for a different service (e.g., from VM to SQL).

Savings Plan scope: Can be shared across subscriptions in the same billing account.

Hybrid Benefit for SQL: Applies to SQL Server VMs and Azure SQL Database managed instance, but not to Azure SQL Database single database unless using vCore-based purchasing model.

Spot VM eviction notice: Typically 30 seconds. The eviction policy can be deallocate or delete.

How to Eliminate Wrong Answers

If the scenario mentions 'steady-state workload' and 'predictable usage,' Reserved Instances or Savings Plan are likely correct.

If the scenario mentions 'flexibility across regions,' choose Savings Plan over RIs.

If the scenario mentions 'existing Windows licenses with Software Assurance,' consider Hybrid Benefit.

If the scenario mentions 'fault-tolerant batch processing,' consider spot VMs.

If the scenario mentions 'underutilized VMs,' look for right-sizing recommendations.

Always check for trade-offs: cost vs. reliability, cost vs. performance. The best answer balances both.

Key Takeaways

Use Azure Cost Management + Billing to monitor and analyze costs.

Right-size VMs using Azure Advisor recommendations (7- or 30-day usage).

Purchase Reserved Instances for steady-state workloads to save up to 72%.

Use Azure Hybrid Benefit for Windows Server and SQL Server to save up to 40% and 55% respectively.

Use Spot VMs for fault-tolerant, interruptible workloads (up to 90% discount).

Set budgets with multiple alert thresholds (e.g., 50%, 80%, 100%) for proactive cost control.

Implement auto-shutdown for non-production VMs and auto-scaling for variable workloads.

Use Azure Savings Plan for flexible, multi-region compute needs (up to 65% discount).

Leverage storage tiering (hot, cool, archive) and lifecycle management to reduce storage costs.

Tag resources for cost allocation and chargeback.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Reserved Instances (RIs)

Applies to specific VM family and region.

Higher discount (up to 72%).

1- or 3-year commitment required.

No flexibility to change VM family or region.

Can be exchanged for another RI of same type.

Azure Savings Plan

Applies to compute services across regions and families.

Lower discount (up to 65%).

1- or 3-year commitment required.

Flexible: changes automatically apply to any eligible compute usage.

Cannot be exchanged; covers any compute in scope.

Watch Out for These

Mistake

Reserved Instances apply to all Azure services.

Correct

Reserved Instances only apply to compute services like VMs, Azure SQL Database, and Azure Cosmos DB. They do not cover storage, networking, or other services.

Mistake

Azure Hybrid Benefit can be used for any Azure service.

Correct

Hybrid Benefit only applies to Windows Server and SQL Server workloads. It cannot be used for Linux VMs or other services.

Mistake

Spot VMs are never evicted if you pay a premium.

Correct

Spot VMs can be evicted at any time when Azure needs capacity, regardless of payment. There is no premium option to prevent eviction.

Mistake

Budget alerts trigger when actual costs exceed the threshold.

Correct

Budget alerts trigger when forecasted costs exceed the threshold, not actual costs. Actual cost alerts are different and require a separate configuration.

Mistake

Azure Savings Plan provides the same discount as Reserved Instances.

Correct

Savings Plan discounts are up to 65%, while Reserved Instances can reach up to 72%. RIs offer higher discounts for more specific commitments.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

What is the difference between Azure Reserved Instances and Azure Savings Plan?

Reserved Instances (RIs) offer a higher discount (up to 72%) but are specific to a VM family and region. Azure Savings Plan offers a lower discount (up to 65%) but applies flexibly across compute services, regions, and instance families. Use RIs for predictable, steady-state workloads in a fixed region. Use Savings Plan for dynamic or multi-region deployments.

Can I use Azure Hybrid Benefit for Linux VMs?

No, Azure Hybrid Benefit only applies to Windows Server and SQL Server workloads. It is not available for Linux VMs. However, you can use it for Windows VMs running on Azure and for SQL Server on Azure VMs or Azure SQL Database.

How do I set up a budget alert in Azure?

In Azure Cost Management, go to Budgets, click Add. Set the scope (subscription or resource group), amount, and time period (monthly, quarterly, annual). Configure alert thresholds (e.g., 50%, 80%, 90%, 100%) and action groups (email, webhook). Budget alerts trigger when forecasted costs exceed the threshold.

What happens when a Spot VM is evicted?

When Azure needs capacity, it sends a 30-second notice before evicting a Spot VM. The eviction policy can be set to deallocate (stop the VM but keep disks) or delete (remove the VM and disks). The workload must be designed to handle interruptions, such as checkpointing or using stateless architectures.

How do I right-size a VM using Azure Advisor?

In Azure Advisor, go to the Cost tab. Advisor analyzes VM CPU and network utilization over the last 7 or 30 days. For underutilized VMs (CPU < 5% and network < 7 MB/s), it recommends a smaller size. You can resize directly from the recommendation. Always test the workload after resizing to ensure performance.

What is the best storage tier for data accessed once a month?

For data accessed infrequently (once a month), use the Cool storage tier. It offers lower storage costs than Hot but higher access costs. If data is accessed less than once a year, use Archive. Use lifecycle management to automatically move blobs between tiers based on age.

Can I combine Reserved Instances with Azure Hybrid Benefit?

Yes, you can use both together. Azure Hybrid Benefit reduces the software cost, and Reserved Instances reduce the compute cost. For example, if you have a Windows VM with Hybrid Benefit, you can also purchase a Reserved Instance for that VM to maximize savings.

Terms Worth Knowing

Ready to put this to the test?

You've just covered Cost Optimization Architecture Patterns — now see how well it sticks with free AZ-305 practice questions. Full explanations included, no account needed.

Done with this chapter?