Google Cloud Professional Cloud Developer — Question 123
You are developing a marquee stateless web application that will run on Google Cloud. The rate of the incoming user traffic is expected to be unpredictable, with no traffic on some days and large spikes on other days. You need the application to automatically scale up and down, and you need to minimize the cost associated with running the application. What should you do?
Answer options
- A. Build the application in Python with Firestore as the database. Deploy the application to Cloud Run.
- B. Build the application in C# with Firestore as the database. Deploy the application to App Engine flexible environment.
- C. Build the application in Python with CloudSQL as the database. Deploy the application to App Engine standard environment.
- D. Build the application in Python with Firestore as the database. Deploy the application to a Compute Engine managed instance group with autoscaling.
Correct answer: A
Explanation
The correct answer is A because deploying on Cloud Run allows the application to automatically scale based on demand, which is ideal for unpredictable traffic patterns while minimizing costs since you only pay for the resources you use. Options B and C utilize environments that may not scale as efficiently or could incur higher costs, and option D employs Compute Engine, which requires more management and does not scale as seamlessly as Cloud Run in this scenario.