Courseiva
Planning and Configuring a Cloud SolutionmediumMultiple ChoiceObjective-mapped

Google ACE Planning and Configuring a Cloud Solution Practice Question

A company needs to run a batch job every hour on a Compute Engine VM. The VM should be terminated after the job completes to save costs. The job is run from a script inside a custom container image stored in Container Registry. Which approach is the most cost-effective?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a VM with a preemptible instance setting and a startup script that runs the container, then shuts down the VM

Compute Engine preemptible VMs are up to 60-91% cheaper than regular VMs. For batch jobs that can be interrupted, they are highly cost-effective. Combining with a startup script that pulls and runs the container, and having the script shut down the VM after the job, minimizes costs.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a VM with a preemptible instance setting and a startup script that runs the container, then shuts down the VM

    Why this is correct

    This is correct because a preemptible VM costs significantly less than a standard VM and is ideal for fault-tolerant batch processing. The startup script automatically runs the container when the VM boots, and once the job completes, the script shuts down the VM to stop compute billing. Although preemptible VMs can be reclaimed by Google at any time, a job running hourly can simply retry on the next scheduled run. You still pay for the persistent disk while the VM exists, but the compute cost savings far outweigh that.

  • Use a managed instance group with autoscaling and a target CPU load of 0%

    Why it's wrong here

    A managed instance group (MIG) with autoscaling and a 0% target CPU load cannot scale down to zero instances; there is always at least one running VM. That means you'd keep paying for a full-time VM for a job that runs only once per hour, which is not cost-effective. Additionally, MIG autoscaling is designed for serving workloads that need nginx or other stateless server processes, not for a batch container that should start, execute, and terminate. The core failure here is the misconception that setting a 0% target causes the group to empty itself out.

  • Use a regular VM and stop it manually when the job finishes

    Why it's wrong here

    Manually stopping a standard VM after the job finishes fails the automation requirement for an hourly batch job. Someone must be available to detect completion and issue the stop command, which is error-prone and not a production-grade solution. Even when a VM is in the stopped state, you continue to pay for the persistent disk and any static IP addresses, so you don't fully eliminate costs. Compared with the preemptible approach, this option is both less automated and more expensive for the same workload.

  • Use Cloud Run with a scheduled job

    Why it's wrong here

    Cloud Run is for HTTP-triggered containers, not batch jobs that need to run on a schedule. Cloud Scheduler + Cloud Run can work but Cloud Run has request timeout limits (60 minutes) and is per-request pricing; for a long-running batch job, preemptible VM is more cost-effective.

About these practice questions

One of 769 original ACE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.