
Answer-first summary for fast verification
Answer: Build the application in Python with Firestore as the database. Deploy the application to Cloud Run.
The application needs to handle unpredictable traffic with auto-scaling and minimal cost. Cloud Run is ideal as it scales to zero when there’s no traffic (minimizing costs) and scales up quickly during spikes. Firestore, being serverless, aligns with cost efficiency and scalability. Python is a supported language. App Engine flexible (B) and Compute Engine (D) don’t scale to zero, incurring baseline costs. Option C uses Cloud SQL, which requires a running instance, adding fixed costs. Thus, A is the best choice.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are building a stateless web application on Google Cloud that must handle unpredictable traffic patterns, including periods of no traffic and sudden spikes. The application should scale automatically while minimizing operational costs. What is the best approach to achieve this?
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.