Google Cloud Professional Cloud DevOps Engineer — Question 197
You are deploying a new web application on Cloud Run in your Google Cloud project. You expect traffic to range from 10 requests per second during off-peak hours to 1000 requests per second during peak hours. You want to use autoscaling to efficiently handle the changes in traffic while ensuring that the autoscaler does not exceed your project's resource quotas. What should you do?
Answer options
- A. Manually adjust the number of instances based on observed traffic patterns throughout the day.
- B. Define appropriate resource limits for the Cloud Run service, and ensure your project has sufficient resource quotas to accommodate the desired scaling range.
- C. Configure the autoscaler to scale based on CPU utilization with a target of 80%.
- D. Configure the autoscaler to scale based on request count, with a target of 500 requests per instance.
Correct answer: B
Explanation
The correct answer is B because defining resource limits and ensuring sufficient quotas allows the autoscaler to manage traffic efficiently without surpassing project limits. Option A is incorrect as manual adjustments do not utilize autoscaling capabilities. Option C focuses on CPU utilization, which may not be the best metric for handling varying request traffic, and option D sets a specific request count per instance that may not align with the overall scaling needs.