Courseiva
Develop Azure compute solutionshardMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

You are developing a solution that uses Azure Container Apps. Your application is a microservice that needs to expose a gRPC endpoint. The service must scale to zero when idle. What should you do?

⚠ Common exam trap

Test-takers frequently assume Azure Functions can handle gRPC via custom handlers or that ACI supports autoscaling, but neither service provides native gRPC support or the scale-to-zero capability required for this specific workload.

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 to Azure Container Apps and configure a scale rule with minReplicas set to 0.

Azure Container Apps natively supports gRPC endpoints and can scale to zero by setting `minReplicas` to 0 in a scale rule. This configuration allows the microservice to run only when there are active requests, reducing costs during idle periods. The combination of gRPC support and dynamic scaling makes Container Apps the correct choice for this scenario.

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 Functions with a gRPC trigger.

    Why it's wrong here

    Azure Functions primarily supports HTTP, queue, blob, and other event-driven triggers, but it does not natively offer a gRPC trigger binding. While Functions can consume gRPC services as a client or host a custom runtime that processes gRPC, it cannot directly initiate a function execution based on an incoming gRPC call in the same way it handles an HTTP request. This limitation makes it unsuitable for directly exposing a microservice via gRPC as its primary entry point.

  • Deploy the microservice to Azure Container Apps and configure a scale rule with minReplicas set to 0.

    Why this is correct

    Azure Container Apps is specifically designed for hosting microservices and supports gRPC ingress natively, allowing direct exposure of gRPC endpoints. Crucially, it enables configuring scale rules that include setting minReplicas to 0, which means the container app can scale down completely when idle, incurring no cost for compute resources. This combination of gRPC support and true scale-to-zero capability makes it an ideal solution for cost-efficient, event-driven microservices.

  • Deploy the microservice to Azure Kubernetes Service with a virtual node.

    Why it's wrong here

    While Azure Kubernetes Service (AKS) with virtual nodes (powered by Azure Container Instances) allows individual pods to scale dynamically and provides serverless-like billing for those pods, the underlying AKS cluster control plane and at least one worker node (even if a system node pool) must always be running. This means AKS itself cannot achieve true "scale to zero" for the entire cluster infrastructure, as there will always be a baseline cost associated with the cluster's existence, regardless of workload activity.

  • Deploy the microservice to Azure Container Instances with a scale rule.

    Why it's wrong here

    Azure Container Instances (ACI) provides a single-container or container-group execution environment without requiring a full orchestrator like Kubernetes. However, ACI is fundamentally designed for individual, isolated container deployments and lacks native, automatic scaling capabilities based on demand or custom metrics. An ACI instance is either running or stopped, and it cannot dynamically scale out to multiple instances or scale down to zero based on a configured scale rule, making it unsuitable for elastic microservices.

About these practice questions

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