Courseiva

AZ-204 Develop Azure compute solutions Practice Question

Which THREE factors should you consider when choosing between Azure Functions (Consumption plan) and Azure Container Instances for running a background job that processes messages from Azure Service Bus?

⚠ Common exam trap

Test-takers frequently assume Azure Container Instances are always cheaper or more flexible, but they overlook the critical operational differences in automatic scaling, native trigger support for event sources like Service Bus, and the distinct cost models, which are primary decision factors for event-driven background jobs.

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

✓

Scaling behavior (automatic vs. manual).

Option A is correct because Azure Functions on the Consumption plan provides automatic, event-driven scaling (scale controller reacts to Service Bus queue depth), whereas Azure Container Instances requires manual scaling or external orchestration, which is a key decision factor for a background message processor. Option B is correct because the Consumption plan bills per execution plus GB-s (consumption-based), while ACI bills per second for allocated vCPU and memory, making the cost model a fundamental differentiator for steady vs. bursty workloads. Option D is correct because Azure Functions has a native Service Bus trigger binding that handles message polling, peek-lock, completion/abandon, and dead-lettering automatically, whereas ACI would require you to implement the Service Bus SDK logic yourself. Option C is not a differentiator here because ACI supports custom base images but Azure Functions also supports custom containers (on Premium/Dedicated or via containerized Functions), and it is not one of the primary factors for this scenario. Option E is not a primary factor because cold start latency is a performance consideration, not a core architectural factor for choosing between these two compute options for a Service Bus background job.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Scaling behavior (automatic vs. manual).

    Why this is correct

    Scaling behavior is a critical distinction. Azure Functions, particularly on the Consumption plan, offers fully automatic, event-driven scaling, abstracting infrastructure management and scaling out instances based on demand. Azure Container Instances (ACI), conversely, requires explicit scaling decisions; while you can deploy multiple instances, ACI itself does not auto-scale based on load like Functions. For highly dynamic or unpredictable workloads, Functions' inherent auto-scaling is a significant advantage, whereas ACI provides more control but demands manual intervention or integration with other services for scaling.

  • ✓

    Cost model (per execution vs. per second).

    Why this is correct

    The cost model presents a fundamental difference. Azure Functions on the Consumption plan bills based on the number of executions, memory consumed, and execution duration, making it highly cost-effective for intermittent or event-driven workloads where you only pay when your code runs. Azure Container Instances (ACI) charges for the total duration your container group is running, billed per second for allocated CPU and memory resources, regardless of whether it's actively processing requests. This distinction directly impacts cost efficiency, especially for idle or low-traffic periods, making it a critical financial consideration.

  • ✗

    Ability to use custom base images.

    Why it's wrong here

    The ability to use custom base images is not a differentiating factor, as both services offer this capability. Azure Functions, especially when deployed on Linux with custom handlers or container support, allows you to package your function app into a custom Docker image, providing full control over the runtime environment and dependencies. Similarly, Azure Container Instances (ACI) is inherently designed to run any Docker container, making the use of custom base images a standard and robust feature for deploying applications on the platform. Therefore, this capability is not a unique advantage for either service.

  • ✓

    Native support for Service Bus trigger.

    Why this is correct

    Native support for Service Bus triggers is not a distinguishing factor, as both platforms can readily integrate with Azure Service Bus. Azure Functions provides native, declarative bindings for Service Bus triggers, simplifying the development of event-driven applications that react to messages. While ACI does not have 'native triggers' in the same way, any application running within an ACI container can easily consume messages from a Service Bus queue or topic using the appropriate language SDK (e.g., .NET, Java, Python). Consequently, the ability to process Service Bus messages is available to both platforms.

  • ✗

    Cold start latency.

    Why it's wrong here

    Cold start latency is a significant factor for performance-sensitive applications. Azure Functions on the Consumption plan can experience cold starts, where the platform needs to provision and initialize the function app instance before processing the first request after a period of inactivity, leading to initial delays. Azure Container Instances, conversely, runs continuously once started, eliminating cold start issues because the container is always allocated and ready to process requests. For latency-sensitive workloads with unpredictable traffic patterns, ACI offers more consistent response times by avoiding these initial delays.

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

About these practice questions

Courseiva writes every AZ-204 question from scratch — 883 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 →

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.