Question

Difficulty: MediumDesigning Infrastructure for Business Requirements and Cost Optimization

An online gaming platform is designing its architecture on Google Cloud for a single-region backend deployment. The system needs to support a relational user profile database that requires regional high availability but does not require multi-region global synchronization. Additionally, the platform runs a short daily batch analytics job that parses 50 GB of match logs stored in Cloud Storage. The architecture team needs to minimize baseline operational costs and avoid paying for idle compute resources during non-peak hours. Which TWO architectural decisions should you recommend to satisfy these requirements?

  1. Use Cloud SQL for PostgreSQL with regional High Availability (HA) for the user profile database.Answer
  2. B
    Provision a multi-region Cloud Spanner instance with high-priority processing units for the user profile database.
  3. Execute the daily log processing batch task using containerized Cloud Run jobs scheduled via Cloud Scheduler.Answer
  4. D
    Deploy a persistent Google Kubernetes Engine (GKE) Standard cluster running continuously to process the daily log batch job.

Answer

The optimal solution is to use Cloud SQL for PostgreSQL with regional High Availability for the database tier and execute the daily batch analytics job using scheduled Cloud Run jobs.
Cloud SQL with regional High Availability provides robust single-region failover and relational storage without the high baseline costs of Cloud Spanner. Cloud Run jobs provide a serverless execution environment that runs batch tasks to completion and automatically scales down to zero, ensuring costs are strictly proportional to execution time.

Step-by-Step Solution

1
Evaluate relational storage requirements against cost targets
Since the workload is confined to a single region and requires standard relational HA, Cloud SQL meets all requirements at a fraction of the cost of Cloud Spanner.
Cloud Spanner is designed for multi-region or global horizontal scaling, making it over-engineered and cost-prohibitive for single-region relational needs.
2
Evaluate batch compute execution model
Containerized tasks executing short daily batch jobs are best served by serverless compute such as Cloud Run jobs.
Cloud Run jobs execute containerized workloads on demand and scale to zero upon completion, preventing ongoing compute costs associated with running persistent clusters.

Key Concept

Selecting right-sized database and serverless compute primitives to optimize cloud cost and operational overhead based on application scope.
Rate this question