A Kubernetes app pulls Pub/Sub messages and writes to Filestore; a single pod cannot process messages in real time and messages back up. The processing is I/O-intensive. How should you scale processing?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure a Kubernetes autoscaling deployment driven by the subscription/num_undelivered_messages Pub/Sub metric..
Why this is the answer
The correct solution is to configure Kubernetes autoscaling based on the subscription/numundeliveredmessages Pub/Sub metric. This directly addresses the problem of messages backing up by scaling out the processing pods when the number of undelivered messages increases. CPU-based autoscaling (--cpu-percent=50) is less effective here because the processing is I/O-intensive, meaning CPU utilization might not be a direct indicator of backlog. Cluster autoscaling (--enable-autoscaling) scales the underlying nodes, not the application pods themselves, and wouldn't directly respond to the Pub/Sub backlog. While subscription/pushrequestlatencies could indicate a problem, numundeliveredmessages is a more direct and actionable metric for scaling out consumers to clear the backlog.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed