
Answer-first summary for fast verification
Answer: Horizontal Pod Autoscaler based on an external metric
The Horizontal Pod Autoscaler (HPA) based on an external metric (option C) is the correct choice. The scenario describes a workload where scaling needs to respond to the volume of Pub/Sub messages, which is an external system metric (e.g., Pub/Sub subscription backlog size). HPA can scale the number of pods based on this metric to handle varying message rates. Vertical Pod Autoscaler (options A/B) adjusts CPU/memory per pod, which is irrelevant here since the problem states pods handle a fixed message rate. HPA based on resource utilization (option D) would not directly align with the message backlog, making it less effective for this use case.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
What GKE feature should you use to automatically scale your Deployment to handle varying message processing demands from Pub/Sub, including occasional large batches, while maintaining timely processing?
A
Vertical Pod Autoscaler in Auto mode
B
Vertical Pod Autoscaler in Recommendation mode
C
Horizontal Pod Autoscaler based on an external metric
D
Horizontal Pod Autoscaler based on resources utilization