Skip to main content
InterviewHubPRO
Section Overview
Q20

Question 20 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

40%
Kubernetes (K8s) (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

Horizontal Pod Autoscaler (HPA) vs. Vertical Pod Autoscaler (VPA) vs. KEDA.

senior LevelMost AskedKubernetesSystem Design

In Simple Words:

  • Horizontal Pod Autoscaler (HPA): Scales the number of pod replicas up or down based on CPU, memory, or custom metrics.
  • Vertical Pod Autoscaler (VPA): Adjusts the CPU and memory requests/limits of existing pods. (Historically required restarting pods; in Kubernetes 1.27+, in-place pod resizing is entering production readiness).
    • Warning: Running HPA and VPA on the same resource on CPU/Memory causes catastrophic scaling oscillation fights!
  • KEDA (Kubernetes Event-driven Autoscaling): Extends HPA to scale workloads from 0 to $N$ based on event sources (Kafka lag, RabbitMQ queue depth, AWS SQS message count, Redis list size).