Courseiva
Develop Azure compute solutionsmediumMultiple ChoiceObjective-mapped

AZ-204 Develop Azure compute solutions Practice Question

A company deploys a microservices application on Azure Kubernetes Service (AKS). They need to automatically scale individual microservices based on custom metrics (e.g., queue depth). Which feature should they use?

⚠ Common exam trap

It's easy for candidates to confuse Horizontal Pod Autoscaler (scaling replicas) with Cluster Autoscaler (scaling nodes) or Vertical Pod Autoscaler (scaling pod resources), but only HPA supports custom metrics for per-microservice replica scaling.

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

Horizontal Pod Autoscaler

The Horizontal Pod Autoscaler (HPA) is the correct choice because it automatically scales the number of pod replicas in a deployment or replica set based on observed metrics, including custom metrics like queue depth. HPA queries the Kubernetes Metrics API, which can be extended with custom metrics adapters (e.g., Prometheus Adapter) to support application-specific metrics, enabling fine-grained scaling for each microservice.

Answer analysis

Option-by-option breakdown

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

  • Horizontal Pod Autoscaler

    Why this is correct

    The Horizontal Pod Autoscaler (HPA) automatically scales the number of pod replicas in a deployment or replica set based on observed CPU utilization, memory usage, or other custom metrics. For microservices applications, HPA is the correct choice as it can leverage application-specific custom metrics from sources like Azure Monitor or Prometheus to dynamically adjust the number of running pods to match real-time demand, ensuring optimal performance and resource efficiency.

  • Virtual Node

    Why it's wrong here

    A Virtual Node, implemented via Azure Container Instances (ACI) in Azure Kubernetes Service (AKS), allows the Kubernetes cluster to burst capacity by provisioning new nodes on demand for pods that cannot be scheduled on existing nodes. While it provides serverless compute for pods and expands the cluster's capacity, it does not automatically scale the number of *existing* pod replicas based on application load or custom metrics; it's a node-level scaling mechanism for unschedulable pods.

  • Vertical Pod Autoscaler

    Why it's wrong here

    The Vertical Pod Autoscaler (VPA) automatically adjusts the CPU and memory requests and limits for individual pods based on their historical and real-time resource usage. Its primary function is to optimize resource allocation for a single pod instance, preventing resource starvation or over-provisioning. However, VPA does not scale the *number* of pod replicas; it only resizes the resources available to existing pods, making it unsuitable for scaling based on custom application metrics.

  • Cluster Autoscaler

    Why it's wrong here

    The Cluster Autoscaler automatically adjusts the number of nodes (virtual machines) in the Kubernetes cluster's node pools. It monitors for unschedulable pods and adds new nodes when capacity is needed, or removes underutilized nodes to save costs. While essential for ensuring the cluster has sufficient underlying infrastructure, the Cluster Autoscaler does not directly manage the number of *pod replicas* for a specific application deployment based on its performance metrics.

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.