Bird
0
0

You want to autoscale a microservice based on both CPU usage and request latency. How should you configure the Horizontal Pod Autoscaler?

hard📝 Trade-off Q8 of 15
Microservices - Orchestration with Kubernetes
You want to autoscale a microservice based on both CPU usage and request latency. How should you configure the Horizontal Pod Autoscaler?
ACreate two separate HPAs, one for CPU and one for latency
BUse multiple metrics in the HPA spec with CPU and custom latency metrics
CSet targetCPUUtilizationPercentage and ignore latency
DUse only latency metric and ignore CPU
Step-by-Step Solution
Solution:
  1. Step 1: Understand multi-metric scaling

    HPA supports multiple metrics to decide scaling actions.
  2. Step 2: Combine CPU and latency metrics

    Configure HPA spec with both CPU and custom latency metrics for balanced scaling.
  3. Final Answer:

    Use multiple metrics in the HPA spec with CPU and custom latency metrics -> Option B
  4. Quick Check:

    HPA supports multiple metrics in one spec [OK]
Quick Trick: Combine CPU and latency metrics in one HPA spec [OK]
Common Mistakes:
MISTAKES
  • Creating multiple HPAs for same deployment
  • Ignoring latency metric
  • Using deprecated single metric fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes