AZ-204 Develop Azure compute solutions Practice Question
A company deploys an Azure Function app that processes orders. The function needs to scale out automatically when the queue length grows and be billed only for execution time. Which hosting plan should you use?
⚠ Common exam trap
Test-takers frequently confuse the Premium Plan's pre-warmed instances and VNET support with the Consumption Plan's true pay-per-execution model, mistakenly thinking Premium is required for auto-scaling, when in fact the Consumption Plan handles queue-length-based scaling natively and is the only plan with pure execution-time billing.
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
✓
Consumption Plan
The Consumption Plan is correct because it automatically scales out the function app based on the length of the Azure Storage queue trigger, and you are billed only for the execution time (per-second billing) and resources consumed. This plan is ideal for event-driven workloads like order processing, where scaling is demand-driven and idle time incurs no cost.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
App Service Plan
Why it's wrong here
The App Service Plan provides dedicated, pre-provisioned virtual machines for hosting web apps and functions. This plan incurs a fixed hourly or monthly cost for the underlying compute resources, regardless of the actual function execution time or number of invocations. While it offers configurable auto-scaling rules, it lacks the automatic, granular scaling and true pay-per-execution billing model inherent to serverless functions, making it less cost-effective for highly variable, event-driven workloads like order processing.
- ✓
Consumption Plan
Why this is correct
The Consumption Plan is the quintessential serverless hosting option for Azure Functions, automatically provisioning and scaling compute resources on demand in response to events. It charges only for the resources consumed (memory, CPU) and the execution time, billed per second, making it highly cost-efficient for intermittent or variable workloads. This plan eliminates the need to manage infrastructure and ensures costs directly align with actual function usage for processing orders.
- ✗
Premium Plan
Why it's wrong here
The Premium Plan for Azure Functions offers enhanced capabilities such as pre-warmed instances to eliminate cold starts and VNET integration for secure network access. While it provides dynamic scaling based on demand, it maintains a minimum number of instances that are always running, incurring a base cost even during periods of low or no activity. This makes it more expensive than the Consumption Plan for workloads that do not require always-ready instances or advanced networking features, as it is not purely pay-per-execution.
- ✗
Dedicated Plan
Why it's wrong here
The Dedicated Plan, often referred to as an App Service Plan, involves running Azure Functions on pre-allocated, dedicated virtual machines. This hosting model provides a consistent and predictable environment with fixed costs for the provisioned compute resources, irrespective of function execution. It does not offer the automatic scaling or the pay-per-execution billing model of serverless functions, making it unsuitable for optimizing costs based on the variable nature of order processing events.
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.