AZ-204 Azure Container Apps Practice Question
Your company has an Azure Kubernetes Service (AKS) cluster that hosts multiple microservices. You are tasked with deploying a new microservice that processes incoming HTTP requests and publishes messages to an Azure Service Bus topic. The microservice must scale based on the number of messages in the topic, and it must support graceful shutdown to complete in-flight requests. You need to choose the appropriate compute platform. The microservice is stateless and can be containerized. You want to minimize operational overhead and cost. The solution must automatically scale to zero when there are no messages. Which option should you choose?
Option A: Deploy the microservice as an Azure Function with a Service Bus trigger on the Consumption plan. Option B: Deploy the microservice as a container in AKS with a Horizontal Pod Autoscaler based on Service Bus queue length. Option C: Deploy the microservice as an Azure Container App with a Service Bus scale rule. Option D: Deploy the microservice as an Azure App Service WebJob with continuous mode.
⚠ Common exam trap
The trap is that candidates often choose Azure Functions for its event-driven scaling and scale-to-zero capability, but overlook the requirement for containerization and graceful shutdown. Azure Container Apps provides both container support and fine-grained shutdown control, making it the optimal choice.
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
✓
Deploy the microservice as an Azure Container App with a Service Bus scale rule.
Azure Container Apps (ACA) with a Service Bus scale rule is the correct choice because it provides event-driven scaling based on the number of messages in a Service Bus topic, can scale to zero when there are no messages, supports graceful shutdown via terminationGracePeriodSeconds, and minimizes operational overhead compared to AKS. ACA is a serverless container platform that abstracts Kubernetes complexity while still allowing containerized workloads, making it ideal for stateless microservices that need to scale on demand. Azure Functions with a Service Bus trigger also scales based on messages and can scale to zero, but it does not natively support containerization (unless using custom containers which adds complexity) and has less control over graceful shutdown. AKS requires managing a cluster and does not scale to zero. App Service WebJobs are not containerized and do not scale based on Service Bus metrics.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deploy the microservice as an Azure Function with a Service Bus trigger on the Consumption plan.
Why it's wrong here
Azure Functions on Consumption plan scales based on Service Bus messages and can scale to zero, but the requirement for containerization and fine-grained graceful shutdown control makes Azure Container Apps a better fit. Functions can use custom containers but with more overhead.
- ✗
AKS with HPA based on Service Bus queue length
Why it's wrong here
This option describes AKS with HPA based on Service Bus queue length. AKS provides container orchestration but requires more operational overhead and does not automatically scale to zero; it scales down to a minimum of one pod. Also, HPA based on custom metrics (queue length) adds complexity.
- ✓
Deploy the microservice as an Azure Container App with a Service Bus scale rule.
Why this is correct
Azure Container Apps with a Service Bus scale rule is the correct choice because it offers event-driven scaling to zero, supports containerized workloads, and provides configurable graceful shutdown, all with minimal operational overhead.
- ✗
Azure App Service WebJob with continuous mode
Why it's wrong here
This option describes Azure App Service WebJob with continuous mode. WebJobs are not containerized and do not automatically scale based on message count; they run continuously on the App Service plan, which does not scale to zero.
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 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.
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.
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.