Google Cloud Professional Cloud Architect — Question 148
Your company has a Kubernetes application that pulls messages from Pub/Sub and stores them in Filestore. Because the application is simple, it was deployed as a single pod. The infrastructure team has analyzed Pub/Sub metrics and discovered that the application cannot process the messages in real time. Most of them wait for minutes before being processed. You need to scale the elaboration process that is I/O-intensive. What should you do?
Answer options
- A. Use kubectl autoscale deployment APP_NAME --max 6 --min 2 --cpu-percent 50 to configure Kubernetes autoscaling deployment.
- B. Configure a Kubernetes autoscaling deployment based on the subscription/push_request_latencies metric.
- C. Use the --enable-autoscaling flag when you create the Kubernetes cluster.
- D. Configure a Kubernetes autoscaling deployment based on the subscription/num_undelivered_messages metric.
Correct answer: D
Explanation
The correct answer is D, as configuring a Kubernetes autoscaling deployment based on the subscription/num_undelivered_messages metric allows for scaling based on the number of messages that haven't been delivered, which directly impacts processing efficiency. Option A only sets CPU thresholds without addressing message backlog, B focuses on latency rather than undelivered messages, and C does not specifically configure the scaling based on relevant metrics.