Question

Difficulty: HardPlanning and Assessing Cloud Compute Solutions

A logistics platform is evaluating Google Cloud compute options for two application services with distinct operational and cost constraints:

1. Workload X: A stateless, containerized REST API that experiences unpredictable traffic spikes and extended idle periods. It requires automatic scaling down to zero instances to eliminate ongoing infrastructure expenses.
2. Workload Y: A 4-hour batch processing job that analyzes historical GPS telemetry. The job is fault-tolerant, regularly checkpoints its state, and must execute at the lowest possible per-hour compute cost.

Which deployment strategy best meets the requirements for both workloads while minimizing operational overhead and cost?

  1. Deploy Workload X on Cloud Run, and deploy Workload Y on Compute Engine Spot VMs.Answer
  2. B
    Deploy Workload X on Cloud Run, and deploy Workload Y on Cloud Functions.
  3. C
    Deploy Workload X on Compute Engine Spot VMs, and deploy Workload Y on GKE Autopilot.
  4. D
    Deploy Workload X on GKE Standard, and deploy Workload Y on Cloud Run.

Answer

Deploy Workload X on Cloud Run, and deploy Workload Y on Compute Engine Spot VMs.
The combination of Cloud Run for the stateless REST API and Compute Engine Spot VMs for the batch job perfectly matches all operational constraints. Cloud Run scales seamlessly to zero during idle periods to eliminate cost, while Spot VMs provide the lowest per-hour compute rates for a long-running, fault-tolerant batch application.

Step-by-Step Solution

1
Analyze Workload X requirements.
Workload X is a stateless containerized REST API with variable traffic requiring zero-cost scaling during idle periods.
Cloud Run is a fully managed serverless container platform that automatically scales instances based on incoming traffic down to 0 when no requests are received.
2
Analyze Workload Y requirements.
Workload Y is a long-running (4-hour), batch job that is fault-tolerant and requires maximum cost reduction.
Compute Engine Spot VMs offer unused capacity at deep discounts (up to 90% off standard pricing). Because Workload Y checkpoints state and tolerates preemptions, Spot VMs provide the optimal balance of execution length support and cost efficiency.
3
Evaluate combined architecture options against constraints.
Cloud Run for Workload X and Compute Engine Spot VMs for Workload Y meets all functional, timing, and pricing criteria.
Alternative options violate serverless execution timeout limits (Cloud Functions/Cloud Run for 4-hour jobs) or introduce unnecessary idle infrastructure costs and availability risks (GKE Standard or Spot VMs for live API traffic).

Key Concept

Selecting GCP compute resources based on workload statefulness, execution duration, scaling characteristics, and fault tolerance.
Estimated Time:2m 0s
Rate this question