Courseiva
Develop Azure compute solutionsmediumMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You are developing an Azure Functions app that processes orders. The function must scale out automatically during peak hours but should not incur costs when idle. Which hosting plan should you use?

⚠ Common exam trap

Many exam-takers confuse the Premium plan's 'always ready' instances with the Consumption plan's true scale-to-zero capability, mistakenly thinking Premium is required for automatic scaling, when in fact Consumption provides automatic scaling and zero-cost idle behavior.

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 your function app based on demand, including scaling out to handle peak loads, and you only pay for execution time and resources consumed when your functions are running. When idle, there are no costs because the plan does not reserve any instances; it relies on a dynamic, event-driven scale model that can scale down to zero.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Premium plan

    Why it's wrong here

    The Azure Functions Premium plan offers pre-warmed instances to eliminate cold starts and provides VNET connectivity, but it incurs a minimum cost even when idle due to these always-ready resources. While it offers enhanced performance and features over the Consumption plan, its continuous base cost makes it less suitable for scenarios where extreme cost optimization for potentially infrequent or idle periods is the primary driver for an Azure Functions app.

  • Container Instances

    Why it's wrong here

    Azure Container Instances (ACI) is a service for running individual Docker containers on demand without managing virtual machines. While Azure Functions can be deployed as custom containers, ACI itself does not provide the native event-driven scaling, built-in triggers, or integrated monitoring capabilities inherent to Azure Functions hosting plans. Using ACI for a typical Azure Functions app would require significant manual configuration and lose the core serverless benefits, making it an inefficient choice.

  • App Service plan

    Why it's wrong here

    An App Service plan provides dedicated, continuously running compute resources for hosting web apps, APIs, and functions. Unlike serverless plans, it requires you to provision and pay for a fixed number of virtual machine instances that are always active, regardless of whether your functions are executing. This "always-on" nature leads to constant, predictable costs, which is inefficient and expensive for event-driven Azure Functions workloads that might experience long periods of inactivity.

  • Consumption plan

    Why this is correct

    The Consumption plan is the quintessential serverless hosting option for Azure Functions, offering automatic scaling from zero instances and charging only for the compute resources consumed during function execution. It dynamically allocates and deallocates resources based on incoming events, meaning you pay nothing when your functions are idle. This pay-per-execution model makes it the most cost-effective choice for intermittent, event-driven, or highly variable workloads where minimizing idle costs is paramount.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

Go deeper

Related to this question

About these practice questions

One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.