Professional Cloud ArchitectManage and provision solution infrastructureMedium

A financial services company needs to process daily batch jobs that analyze market data. These jobs are computationally intensive, can tolerate flexible execution times (e.g., within a 24-hour window), and need to minimize infrastructure costs. The company wants to leverage machine images for consistent environments. Which Google Cloud compute solution should they use?

  1. ACompute Engine with Standard VMs
  2. BCompute Engine with Spot VMs and Managed Instance Groups
  3. CCloud Functions
  4. DGoogle Kubernetes Engine (GKE) with Autopilot
Show answer & explanation

Correct answer: B. Compute Engine with Spot VMs and Managed Instance Groups

Spot VMs (formerly Preemptible VMs) offer significant cost savings for fault-tolerant workloads, and Managed Instance Groups (MIGs) can manage their lifecycle, recreate preempted instances, and scale based on workload, making them ideal for cost-effective batch processing.

Why the other options are wrong

  • A. Standard VMs are more expensive than Spot VMs and don't offer the same cost optimization for fault-tolerant batch jobs.
  • C. Cloud Functions are serverless and event-driven, suitable for short-lived, stateless functions, not computationally intensive batch jobs that use machine images.
  • D. GKE Autopilot is good for containerized applications but might be overkill and more expensive for simple batch jobs that can run on VMs, especially when cost is a primary concern.

Spot VMs with MIGs

Spot VMs provide significant cost savings for fault-tolerant workloads, and Managed Instance Groups (MIGs) can manage their creation, deletion, and recreation, ensuring availability for batch jobs.

  • Spot VMs are up to 91% cheaper than standard VMs.
  • Can be preempted by Compute Engine with 30 seconds notice.
  • MIGs can automatically recreate preempted instances.
  • Ideal for batch processing, analytics, and fault-tolerant tasks.

Memory trick: Spot VMs with MIGs cut costs for batch jobs, like finding a good deal on a team.

More Manage and provision solution infrastructure questions