Question

Difficulty: MediumDesigning Infrastructure for Business Requirements and Cost Optimization

An enterprise fintech startup is launching a stateless REST API microservice to process payment authorization requests. The service experiences unpredictable HTTP traffic spikes during stock market trading hours but receives virtually zero traffic overnight and on weekends. The architecture team must minimize overall infrastructure costs by allowing compute resources to scale down to zero when idle, while also minimizing operational maintenance overhead. Which architectural design best satisfies these business and technical requirements?

  1. Deploy the application container onto Cloud Run, configuring minimum instances to zero and maximum instances to auto-scale based on incoming HTTP concurrency.Answer
  2. B
    Deploy the application as a deployment on a multi-zonal GKE Autopilot cluster with Horizontal Pod Autoscaler (HPA) configured.
  3. C
    Provision a Managed Instance Group (MIG) of Compute Engine VMs sized for peak load, backed by a 3-year Resource Committed Use Discount (CUD).
  4. D
    Deploy the microservice on Compute Engine VMs backed by Cloud Spanner as a high-throughput caching layer to handle scaling spikes.

Answer

Deploy the application container onto Cloud Run, configuring minimum instances to zero and maximum instances to auto-scale based on incoming HTTP concurrency.
Deploying the stateless container onto Cloud Run directly aligns with both business requirements: minimizing cost and reducing operational overhead. Cloud Run automatically manages infrastructure operations, scales seamlessly in response to incoming HTTP requests during trading hours, and scales down to zero instances during idle periods, ensuring the startup only pays for active request processing time.

Step-by-Step Solution

1
Analyze the workload characteristics and business requirements.
The application is a stateless HTTP REST API with unpredictable burst traffic and long idle periods (overnight and weekends). Key constraints are zero idle cost and minimal management overhead.
Identifying workload statefulness and traffic patterns dictates whether serverless, container orchestration, or VM-based compute is most cost-effective.
2
Evaluate compute platforms for scale-to-zero capabilities and operational overhead.
Cloud Run provides a fully managed serverless runtime for containerized web applications that natively scales down to zero instances when idle, incurring zero compute cost during inactive periods.
Serverless container platforms eliminate cluster management overhead and billing for idle compute capacity.
3
Reject sub-optimal architectures that incur baseline idle costs or over-provisioning.
Kubernetes clusters incur baseline cluster and pod infrastructure costs even when scaled down, while static Compute Engine MIGs with long-term CUDs waste money during off-peak hours.
Right-sizing compute based on variable demand requires matching compute billing models to actual usage.

Key Concept

Selecting serverless compute platforms (Cloud Run) over GKE or VM MIGs for stateless HTTP workloads with variable traffic to optimize cost and minimize operational overhead.
Rate this question