Courseiva

Google PCA Manage and provision cloud infrastructure Practice Question

A company is migrating a legacy monolithic application to Google Cloud. The application runs on a single VM and uses a local MySQL database. The goal is to minimize changes to the application code while improving availability. Which strategy should the company use?

⚠ Common exam trap

Candidates often choose Option A, mistakenly believing that a managed instance group with a persistent disk provides database high availability, but they overlook that the persistent disk cannot be shared across instances in a managed instance group without additional orchestration (e.g., regional persistent disks or a clustered filesystem), and the database process itself is not automatically failed over.

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

✓

Lift and shift the VM to Compute Engine, and migrate the database to Cloud SQL with a failover replica.

It minimizes code changes by lifting the application VM to Compute Engine as-is, while migrating the local MySQL database to Cloud SQL with a failover replica. This improves availability through Cloud SQL's managed automatic failover to a standby replica in a different zone, without requiring application code changes to the database connection logic (the application can continue using the same MySQL protocol).

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 a managed instance group for the application VM and store the database on a persistent disk attached to the primary instance.

    Why it's wrong here

    A persistent disk attached to one instance remains a single point of failure; if that instance fails, the database is unavailable, so availability is not improved. Rehosting onto a managed instance group with a managed MySQL service removes that dependency. This option tempts because it is a minimal-change lift-and-shift.

  • ✗

    Re-architect the application into microservices and use Cloud Run for stateless components.

    Why it's wrong here

    Splitting a monolith into microservices demands substantial code rewriting, directly violating the minimal-change requirement. Rehosting the VM and moving MySQL to a managed service improves availability without touching code. Microservices on Cloud Run suit teams deliberately modernising an application, not one seeking a low-effort migration.

  • ✓

    Lift and shift the VM to Compute Engine, and migrate the database to Cloud SQL with a failover replica.

    Why this is correct

    Lifting the VM to Compute Engine preserves the application unchanged, minimising code modifications. Migrating MySQL to Cloud SQL with a failover replica provides automatic failover to a standby in another zone, satisfying the availability goal without application rewrites.

  • ✗

    Containerize the application and deploy on Google Kubernetes Engine (GKE) with Cloud Spanner as the database.

    Why it's wrong here

    Cloud Spanner uses its own SQL dialect and requires application changes, and GKE adds container orchestration work, contradicting the minimal-code-change goal. Lift-and-shift to Compute Engine with a managed MySQL service preserves the code. GKE with Spanner suits cloud-native rewrites needing global scale, not legacy migration.

About these practice questions

Courseiva writes every PCA question from scratch — 807 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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 PCA 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 PCA exam.