Question

Difficulty: MediumDesigning Infrastructure for Business Requirements and Cost Optimization

An enterprise SaaS platform hosts an internal reporting portal in a single Google Cloud region (uscentral1us-central1). The portal executes relational SQL queries against a 1.5 TB database. Query traffic follows a predictable pattern, occurring strictly during weekday business hours (9:00 AM to 5:00 PM), with negligible usage overnight and on weekends. The primary business objective is to minimize total infrastructure costs while ensuring adequate database performance during business hours. Which architectural strategy best satisfies these requirements?

  1. A
    Migrate the database to Cloud Spanner and enable autoscaling to dynamically adjust compute nodes based on real-time query load.
  2. Maintain the workload on Cloud SQL for PostgreSQL and use Cloud Scheduler with Cloud Functions to dynamically scale up instance resources before business hours and scale down during off-peak periods.Answer
  3. C
    Deploy PostgreSQL on a Google Kubernetes Engine (GKE) cluster with StatefulSets and Horizontal Pod Autoscaling (HPA) to scale pods based on CPU consumption.
  4. D
    Purchase 3-year Committed Use Discounts (CUDs) for the maximum peak CPU and memory capacity to cover database provisioning continuously.

Answer

Maintain the workload on Cloud SQL for PostgreSQL and use Cloud Scheduler with Cloud Functions to dynamically scale up instance resources before business hours and scale down during off-peak periods.
Cloud SQL for PostgreSQL provides fully managed relational database functionality appropriate for single-region workloads. Because the traffic pattern is strictly tied to predictable business hours, leveraging automated scheduled scaling to scale up capacity before 9:00 AM and scale down after 5:00 PM minimizes operational spend without sacrificing performance when needed.

Step-by-Step Solution

1
Analyze the workload pattern and scale requirements.
The database workload is predictable, limited to weekday business hours, and runs within a single region (uscentral1us-central1) on a 1.5 TB dataset.
Identifying that usage is predictable and cyclic allows for target capacity planning without paying for continuous peak compute.
2
Evaluate database platform options against business cost constraints.
Cloud SQL is the appropriate tier for a 1.5 TB single-region relational database. Cloud Spanner is over-provisioned for single-region needs, and GKE introduces unneeded management complexity.
Selecting managed single-region services keeps operational and service costs aligned with functional requirements.
3
Determine the optimal cost-optimization scaling strategy.
Automating instance scaling via Cloud Scheduler during known idle hours optimizes compute utilization and reduces billing hours for high-tier machine configurations.
Scheduled vertical scaling aligns resource spend directly with actual usage windows.

Key Concept

Cost-optimized database selection and scheduled resource scaling for predictable workloads.
Estimated Time:1m 30s
Rate this question