Question

Difficulty: HardDesigning Infrastructure for Business Requirements and Cost Optimization

A financial technology enterprise is designing an automated monthly statement generation service on Google Cloud. The service processes unpredictable, highly bursty containerized batch rendering tasks (each requiring 2 vCPUs and 4 GB RAM) that run for 15 to 20 minutes when triggered by customer request events. The workload stays completely idle between batches for days at a time. The business requirement is to minimize total operational costs by eliminating all baseline idle infrastructure expenses, while avoiding administrative overhead for cluster management. Which architecture should you recommend?

  1. A
    Provision a Google Kubernetes Engine (GKE) Standard cluster with cluster autoscaling and Horizontal Pod Autoscaling (HPA) enabled.
  2. Trigger containerized Cloud Run jobs on demand via Eventarc notifications, utilizing Cloud Run Spot instances for execution.Answer
  3. C
    Provision Compute Engine Virtual Machines pre-configured to peak batch capacity and purchase 3-year Committed Use Discounts (CUDs).
  4. D
    Store state in a multi-region Cloud Spanner instance and process statement rendering on a dedicated pool of persistent Compute Engine instances.

Answer

Trigger Cloud Run jobs on demand via Eventarc notifications using Cloud Run Spot instances.
Cloud Run jobs provide an ideal serverless execution platform for containerized tasks that run to completion and do not serve web traffic continuously. Combined with Eventarc for event-driven triggering and Cloud Run Spot for discounted pricing, this architecture scales to zero, incurring absolute zero cost during idle days while eliminating container cluster administration overhead.

Step-by-Step Solution

1
Analyze the workload characteristics and business requirements.
Identified a stateless containerized batch processing workload with unpredictable bursty usage and long idle periods requiring zero baseline cost and low management overhead.
Choosing the correct compute model requires matching workload lifecycle to cloud billing structures.
2
Evaluate compute execution options against cost and management metrics.
Serverless container execution via Cloud Run jobs offers automatic zero-cost idle state and managed infrastructure, eliminating cluster administration.
Dedicated compute models like GKE or persistent VM instances incur baseline maintenance and control plane or instance fees even when idle.
3
Apply targeted cost optimization features suitable for short-lived batch jobs.
Selecting Cloud Run Spot provides steep pricing discounts for batch tasks that can tolerate potential termination or retries.
Cloud Run Spot reduces execution cost further while meeting SLA requirements for asynchronous containerized batch runs.

Key Concept

Serverless batch architecture and cost optimization for bursty workloads
Rate this question