AZ-204 Practice Question: Monitor, troubleshoot, and optimize Azure solutions
You need to reduce costs for an Azure Functions app that runs intermittently. The current Consumption plan bills for execution time. Which change would be MOST cost-effective?
⚠ Common exam trap
A common mix-up: candidates assume higher memory always increases cost, but in Flex Consumption, higher memory can reduce execution time and overall cost for intermittent workloads, while options like Premium or App Service plans introduce fixed costs that are wasteful for sporadic usage.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Migrate to Flex Consumption plan with higher memory
The Flex Consumption plan allows you to configure per-instance memory and concurrency settings, which can reduce costs for intermittent workloads by optimizing resource usage. Unlike the standard Consumption plan, Flex Consumption lets you set higher memory limits without paying for idle time, making it more cost-effective for functions that run sporadically but require more memory when active.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Switch to Premium plan with pre-warmed instances
Why it's wrong here
Switching to an Azure Functions Premium plan, even with pre-warmed instances, is generally not cost-effective for intermittent workloads. Premium plans incur a higher fixed base cost due to dedicated resources and pre-allocated instances, regardless of actual function execution frequency. While pre-warmed instances improve cold start performance, they contribute to this persistent cost, making it less suitable for reducing expenses on functions that run infrequently.
- ✓
Migrate to Flex Consumption plan with higher memory
Why this is correct
Migrating to an Azure Functions Flex Consumption plan with higher memory is an effective strategy for cost reduction. This plan offers a consumption-based model with more granular control over resource allocation, allowing you to optimize memory for specific function needs. By providing sufficient memory, execution times can be significantly reduced, directly lowering the billed duration and overall cost, especially for memory-intensive or CPU-bound functions, while maintaining serverless benefits.
- ✗
Use an App Service plan with Always On
Why it's wrong here
Using an App Service plan with 'Always On' enabled is counterproductive for reducing costs on an Azure Functions app, particularly for intermittent workloads. App Service plans incur a fixed hourly cost for the underlying compute resources, irrespective of function execution. 'Always On' further ensures the app is continuously running and consuming resources to prevent unloading, leading to constant billing and higher expenses compared to event-driven, consumption-based models designed for cost optimization.
- ✗
Deploy to Azure Container Instances
Why it's wrong here
Deploying an Azure Functions app to Azure Container Instances (ACI) is typically not the most cost-effective solution for reducing costs. While ACI offers per-second billing, it requires self-managing the function host runtime within a container, which can introduce operational overhead and potentially less efficient resource utilization compared to native Azure Functions plans. For intermittent workloads, ACI might not scale down to zero as effectively or provide the same cost benefits as optimized serverless consumption models, making it potentially more expensive overall.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Durable Functions
Durable Functions is an extension of Azure Functions that lets you write stateful workflows in code, managing complex sequences of tasks, retries, and delays automatically.
Key term
Azure Functions Bindings
Azure Functions Bindings are declarative connections that link your serverless function code to Azure services or external resources, handling input and output data automatically without writing extra networking or authentication code.
About these practice questions
Courseiva writes every AZ-204 question from scratch — 881 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.