Courseiva
Scaling with Google Cloud operationseasyMultiple ChoiceObjective-mapped

Cloud Digital Leader Scaling with Google Cloud operations Practice Question

A company has a stateful application running on Compute Engine. They want to scale horizontally while preserving state. Which configuration should they use?

⚠ Common exam trap

Watch out — candidates often assume all managed instance groups automatically preserve state, but without explicit stateful configuration, MIGs treat instances as ephemeral and will delete persistent disks on instance deletion or during rolling updates.

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

Managed instance group with stateful configuration.

A managed instance group (MIG) with stateful configuration preserves instance-specific state (such as disks, hostnames, and metadata) across autohealing and rolling updates. This allows the stateful application to scale horizontally while maintaining its persistent data, as each instance retains its unique state even when the group is resized or instances are recreated.

Answer analysis

Option-by-option breakdown

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

  • Use Cloud Run with volumes.

    Why it's wrong here

    Cloud Run is a serverless compute platform designed for stateless, event-driven containers. While it can mount Cloud Storage or Filestore volumes, it lacks durable block storage and local persistent disks, and its instances are recycled quickly without preserving instance identity. This makes it unsuitable for a stateful application that needs horizontal scaling with attached persistent state.

  • Unmanaged instance group.

    Why it's wrong here

    Unmanaged instance groups are simple collections of Compute Engine VMs that you manage individually. They do not support autoscaling, autohealing, or instance template–based creation, and there is no mechanism to configure stateful disks or instance identity. You must manually add or remove VMs and preserve any state yourself, so they are not a scalable solution for a stateful application.

  • Managed instance group with stateful configuration.

    Why this is correct

    A managed instance group with stateful configuration is the correct choice because it combines autoscaling with per-instance preservation of boot disks, data disks, and instance names. Through per-instance configs, you can mark certain VMs as stateful, preventing the autoscaler from deleting them during scale-in while still allowing scale-out. This keeps the application's persistent state intact across the group's lifecycle, enabling horizontal scaling without losing data.

  • Managed instance group with autoscaling and no stateful configuration.

    Why it's wrong here

    A standard autoscaling managed instance group without stateful configuration treats every VM as interchangeable and ephemeral. When the autoscaler scales in, it deletes instances and any data written to their persistent disks that was not part of the instance template's snapshot or image. This causes data loss and downtime for a stateful application, so it is not appropriate for this use case.

About these practice questions

One of 829 original GCDL 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 GCDL 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 GCDL exam.