Question

Difficulty: HardDesigning Infrastructure for Business Requirements and Cost Optimization

An online retail enterprise is migrating a stateless REST API service to Google Cloud. The workload experiences unpredictable traffic spikes during flash sale events but remains idle for extended periods overnight. The primary business goals are to minimize infrastructure costs by eliminating payment for idle compute capacity and to reduce operational overhead for an engineering team with no Kubernetes experience. Which architectural solution should a Cloud Architect recommend?

  1. Deploy the application using Cloud Run, configuring minimum instances to zero and leveraging pay-per-use request-based billing.Answer
  2. B
    Deploy the application onto a Google Kubernetes Engine (GKE) Autopilot cluster using Horizontal Pod Autoscaling (HPA) to scale pods during traffic spikes.
  3. C
    Provision a Compute Engine Managed Instance Group (MIG) sized for peak traffic capacity and purchase a 3-year Committed Use Discount (CUD).
  4. D
    Deploy the stateless service alongside a multi-region Cloud Spanner instance with pre-provisioned processing units to handle request scaling.

Answer

Deploy the application using Cloud Run, configuring minimum instances to zero and leveraging pay-per-use request-based billing.
Deploying the containerized application on Cloud Run directly satisfies all business and operational requirements. Because Cloud Run allows scaling down to zero instances, the enterprise incurs no compute costs during idle overnight periods. Furthermore, as a fully managed serverless product, it requires no underlying cluster administration or Kubernetes expertise.

Step-by-Step Solution

1
Analyze business goals and technical constraints
Identified a stateless REST API with variable and idle traffic patterns, strict requirements to eliminate idle compute costs, and a constraint to avoid Kubernetes management.
Understanding the workload pattern and organizational capabilities dictates the selection of compute paradigms.
2
Evaluate GCP compute options for cost optimization and operational overhead
Cloud Run provides fully managed serverless container execution that automatically scales down to zero instances when no requests are being processed.
Serverless request-driven platforms align cost directly with actual utilization, eliminating baseline infrastructure charges.
3
Assess alternative options against requirements
GKE cluster deployments and fixed MIG provisioning with CUDs incur continuous baseline charges even during zero-traffic periods, failing the requirement to minimize idle costs.
Fixed or cluster-based compute allocations incur static costs that are inefficient for bursty, intermittent workloads.

Key Concept

Selecting serverless compute platforms (Cloud Run) over cluster-based or VM-based infrastructure to optimize costs for bursty, idle workloads while minimizing operational overhead.
Rate this question