Google Cloud Professional Cloud Developer — Question 186
You have an application deployed in Google Kubernetes Engine (GKE) that reads and processes Pub/Sub messages. Each Pod handles a fixed number of messages per minute. The rate at which messages are published to the Pub/Sub topic varies considerably throughout the day and week, including occasional large batches of messages published at a single moment.
You want to scale your GKE Deployment to be able to process messages in a timely manner. What GKE feature should you use to automatically adapt your workload?
Answer options
- 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
Correct answer: C
Explanation
The correct option is C, as the Horizontal Pod Autoscaler based on an external metric allows scaling based on the number of Pub/Sub messages, which is essential for handling variable message rates. Options A and B, focusing on vertical scaling, do not address the need for scalability based on incoming message volume. Option D relies on resource utilization, which may not effectively respond to sudden spikes in message traffic.