A retail company is migrating a legacy web application to Google Cloud. The application consists of a stateless HTTP API backend and a regional relational database that processes standard CRUD transactions. The business requirement is to minimize operational overhead, eliminate baseline infrastructure costs during idle periods, and optimize monthly expenditure while maintaining automatic scaling for peak sales events. Which architectural design best satisfies these requirements?
- Deploy the stateless HTTP API on Cloud Run and host the relational database on Cloud SQL for PostgreSQL with high availability.Answer
- BDeploy the stateless HTTP API on a GKE Standard cluster with Cluster Autoscaler enabled and host the relational database on Cloud SQL for PostgreSQL.
- CDeploy the stateless HTTP API on Cloud Run and host the relational database on a multi-region Cloud Spanner instance.
- DDeploy the stateless HTTP API on Compute Engine virtual machines backed by 3-year Committed Use Discounts sized for peak capacity and host the database on Cloud SQL for PostgreSQL.
Answer
Deploying the stateless HTTP API backend on Cloud Run combined with hosting the relational database on Cloud SQL for PostgreSQL best meets the cost optimization and low operational overhead requirements.
Pairing Cloud Run for stateless HTTP services with Cloud SQL for standard regional relational databases optimizes spend by using scale-to-zero serverless compute while avoiding over-provisioned infrastructure or high-cost global database engines.
Step-by-Step Solution
Key Concept
Selecting cost-effective serverless compute and right-sized managed databases based on workload demand, scale-to-zero capabilities, and operational overhead bounds.