AZ-204 Develop Azure compute solutions Practice Question
You are designing a serverless application using Azure Functions. The function must process messages from an Azure Service Bus queue. The processing time for each message can vary from a few seconds to several minutes. You need to minimize costs while ensuring that messages are processed in a timely manner. Which hosting plan should you recommend?
⚠ Common exam trap
It's easy for candidates to assume the Consumption plan is always the cheapest option, but they overlook its 10-minute execution timeout and cold-start latency, which can cause message processing failures or delays for long-running tasks.
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
✓
Premium plan
The Premium plan is correct because it supports long execution times (up to 60 minutes by default, configurable to unlimited), always-warm instances to avoid cold starts, and virtual network integration—all while providing predictable pricing and scaling. This meets the requirement of processing messages that can take several minutes without incurring the cold-start penalties or execution-time limits of the Consumption plan.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Container Instances plan
Why it's wrong here
Azure Container Instances (ACI) is not a native hosting plan for Azure Functions. While you can containerize a Function App and deploy it to ACI, this approach bypasses the built-in serverless features like automatic scaling, integrated triggers, and managed bindings that are fundamental to Azure Functions. Specifically, ACI does not provide native Service Bus bindings, requiring manual implementation of message processing logic within the container, which negates the serverless advantage and increases operational overhead.
- ✓
Premium plan
Why this is correct
The Azure Functions Premium plan is the optimal choice for scenarios demanding predictable performance, extended execution durations, and elimination of cold starts. It provides pre-warmed instances to ensure immediate response to triggers, crucial for time-sensitive Service Bus message processing. Critically, the Premium plan supports configurable execution timeouts up to 60 minutes, making it suitable for long-running operations that exceed the limits of the Consumption plan, while still offering dynamic scaling.
- ✗
App Service plan
Why it's wrong here
An App Service plan, while capable of hosting Azure Functions, is primarily designed for continuously running web applications and APIs, not event-driven serverless workloads. Unlike true serverless plans, it does not scale to zero instances when idle, meaning you incur costs for allocated resources 24/7, regardless of actual function execution. This continuous resource allocation leads to significantly higher costs for sporadic or infrequent workloads compared to serverless options, making it inefficient for typical Azure Functions use cases.
- ✗
Consumption plan
Why it's wrong here
The Azure Functions Consumption plan, while highly cost-effective for short-lived, event-driven functions, imposes a strict maximum execution timeout of 5 minutes by default (configurable up to 10 minutes for some triggers). For Service Bus messages that require processing times extending "several minutes," this inherent timeout limit is insufficient, causing the function to be prematurely terminated. Therefore, the Consumption plan is unsuitable for long-running operations, necessitating a plan with extended execution duration capabilities.
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
Azure Service Bus
Azure Service Bus is a cloud-based message broker that allows applications, services, and devices to send and receive messages reliably, even when they are not all running at the same time.
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
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.