You are designing a microservices architecture on Azure Kubernetes Service (AKS). The solution must handle traffic spikes by automatically scaling pods based on CPU utilization. Additionally, you need to minimize cost by scaling down nodes when not in use. Which two features should you implement? (Choose two.)
Trap 1: Azure Load Balancer
Azure Load Balancer is a Layer 4 load balancer that distributes inbound traffic to healthy backend instances. It does not evaluate resource utilization metrics or make scaling decisions. Autoscaling requires a control loop that reads metrics and adjusts replica counts, which the load balancer does not provide; it merely routes traffic.
Trap 2: Vertical Pod Autoscaler (VPA)
Vertical Pod Autoscaler works by analyzing historical resource usage and then adjusting the CPU and memory requests and limits of the containers within existing pods, after which it may restart those pods. While it optimizes individual pod resource allocation and can improve utilization, it does not increase the number of pod replicas. For scaling out a microservice horizontally, HPA is the appropriate mechanism.
Trap 3: Azure Container Instances (ACI)
Azure Container Instances is a separate serverless container service that runs containers on demand without managing underlying VMs. In an AKS context, virtual nodes can schedule burstable pods to ACI, but this is not a native AKS autoscaling feature; it is an alternative scheduling target. ACI itself does not modify the replica count of a Kubernetes workload, so it cannot serve as the autoscaler for the microservice.
- A
Azure Load Balancer
Why wrong: Azure Load Balancer is a Layer 4 load balancer that distributes inbound traffic to healthy backend instances. It does not evaluate resource utilization metrics or make scaling decisions. Autoscaling requires a control loop that reads metrics and adjusts replica counts, which the load balancer does not provide; it merely routes traffic.
- B
Horizontal Pod Autoscaler (HPA)
Horizontal Pod Autoscaler is a Kubernetes control loop that queries the Metrics API for CPU, memory, or custom application metrics and automatically updates the replica count of a Deployment or ReplicaSet. This scaling mechanism is fundamental to microservices on AKS because it dynamically matches the number of running pod instances to the observed demand, ensuring high availability and cost efficiency without manual intervention.
- C
Vertical Pod Autoscaler (VPA)
Why wrong: Vertical Pod Autoscaler works by analyzing historical resource usage and then adjusting the CPU and memory requests and limits of the containers within existing pods, after which it may restart those pods. While it optimizes individual pod resource allocation and can improve utilization, it does not increase the number of pod replicas. For scaling out a microservice horizontally, HPA is the appropriate mechanism.
- D
Azure Container Instances (ACI)
Why wrong: Azure Container Instances is a separate serverless container service that runs containers on demand without managing underlying VMs. In an AKS context, virtual nodes can schedule burstable pods to ACI, but this is not a native AKS autoscaling feature; it is an alternative scheduling target. ACI itself does not modify the replica count of a Kubernetes workload, so it cannot serve as the autoscaler for the microservice.
- E
Cluster Autoscaler
Cluster Autoscaler is an AKS component that automatically resizes the node pool by adding or removing nodes based on pending pods that cannot be scheduled due to insufficient cluster capacity. It operates at the infrastructure layer and complements HPA, which handles the pod-level replica count. For a specific microservice, HPA is the primary autoscaler because it directly controls pod replicas, while Cluster Autoscaler addresses cluster-wide resource constraints.