AZ-204 Develop Azure compute solutions Practice Question
You are designing a solution that uses Azure Container Instances (ACI) to run a batch job that processes images. The job is triggered by a message in Azure Queue Storage. Each image takes about 5 minutes to process. You need to ensure that the container runs only when there are messages in the queue and scales automatically. What should you use?
⚠ Common exam trap
Watch out — candidates often assume Azure Functions is the only serverless option for queue-triggered workloads, overlooking that Logic Apps can directly orchestrate ACI creation without writing custom code, which is simpler and more aligned with the requirement to 'run the container only when there are messages'.
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
✓
Use Azure Logic Apps with a Container Instances connector.
Azure Logic Apps provides a serverless workflow that can be triggered by a queue message (via the Azure Queue Storage connector) and then use the Container Instances connector to start a container group. This ensures the container runs only when messages are present and scales automatically by creating a new container instance per message, matching the requirement for event-driven, on-demand execution without idle costs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use Azure Logic Apps with a Container Instances connector.
Why this is correct
Azure Logic Apps provide a robust, serverless workflow engine perfectly suited for event-driven scenarios, such as processing messages from a queue. Its native Azure Container Instances (ACI) connector enables the dynamic creation and execution of a new container instance for each incoming queue message. This design ensures true 'from zero' scaling, where compute resources are provisioned only when needed and deallocated immediately after the containerized task completes, optimizing cost and operational overhead for sporadic batch jobs.
- ✗
Use Azure Functions with a custom container and queue trigger.
Why it's wrong here
While Azure Functions support running custom container images and can be triggered by queue messages, their scaling model primarily scales the underlying Function App host instances, not necessarily launching a distinct, isolated container instance per message. This means the container environment might persist or scale based on host demand rather than individual message processing, potentially incurring costs even when idle. It lacks the granular, per-task isolation and 'from zero' efficiency of directly orchestrating ephemeral ACI instances for each specific message.
- ✗
Use Azure Batch to process the images in a pool of VMs.
Why it's wrong here
Azure Batch manages a pool of VMs and a job scheduler, but it introduces overhead for provisioning and maintaining the underlying compute nodes, which contradicts the requirement for a container that runs only when messages appear and scales automatically without persistent infrastructure. This option is tempting because Azure Batch is designed for high-throughput, parallel batch processing of large workloads, such as rendering or genomic analysis, where a dedicated pool of VMs is justified; in that scenario, it would be the correct choice.
- ✗
Deploy the image processing job as a pod in Azure Kubernetes Service.
Why it's wrong here
Deploying as a pod in Azure Kubernetes Service introduces the overhead of managing a Kubernetes control plane, cluster nodes, and pod scheduling, which is unnecessary for a simple batch job triggered by queue messages. The requirement is for a serverless, event-driven container that scales automatically from zero, which ACI with a virtual node or KEDA integration achieves without cluster management. This option is tempting because AKS excels at orchestrating complex, multi-container microservices with advanced scaling policies, making it the correct choice for a long-running, stateful application requiring load balancing and rolling updates.
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 Container Instances
Azure Container Instances (ACI) is a PaaS service that lets you run a container directly in Azure without managing any underlying servers or orchestration.
Key term
Azure Queue Storage
Azure Queue Storage is a cloud service for storing and retrieving large numbers of messages that can be accessed from anywhere, enabling asynchronous communication between application components.
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 →
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.