Google Cloud Professional Cloud Developer — Question 151
You are developing a single-player mobile game backend that has unpredictable traffic patterns as users interact with the game throughout the day and night. You want to optimize costs by ensuring that you have enough resources to handle requests, but minimize over-provisioning. You also want the system to handle traffic spikes efficiently. Which compute platform should you use?
Answer options
- A. Cloud Run
- B. Compute Engine with managed instance groups
- C. Compute Engine with unmanaged instance groups
- D. Google Kubernetes Engine using cluster autoscaling
Correct answer: A
Explanation
Cloud Run is ideal for applications with unpredictable traffic because it automatically scales up and down based on incoming requests, preventing over-provisioning. While Compute Engine with managed instance groups can also scale, it may not be as efficient for sudden traffic changes as Cloud Run. Unmanaged instance groups require manual intervention for scaling, and Google Kubernetes Engine, although powerful, can be more complex to manage for simple use cases like this.