Google PCA Design and plan a cloud solution architecture Practice Question
A company is migrating a legacy monolithic application to Google Cloud. The application currently runs on a single on-premises server and uses a local MySQL database. The company wants to minimize changes to the application code while improving scalability and reliability. Which migration strategy should the architect recommend?
⚠ Common exam trap
The trap here is that candidates often over-engineer the solution by choosing containerization or microservices, forgetting that the primary constraint is minimizing code changes, not modernizing the architecture.
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
✓
Rehost the application on Compute Engine and use Cloud SQL for MySQL as the database.
Rehosting (lift-and-shift) the monolithic application to Compute Engine with Cloud SQL for MySQL minimizes code changes while improving scalability and reliability. Cloud SQL provides managed MySQL with automated backups, replication, and failover, addressing the need for reliability without requiring application refactoring.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Refactor the application into microservices and deploy on Google Kubernetes Engine.
Why it's wrong here
Refactoring into microservices on GKE rewrites the application's architecture, violating the requirement to minimise code changes. It is tempting because microservices genuinely deliver granular scalability, and GKE suits greenfield or already-decomposed workloads; here, lift-and-shift to Compute Engine with a managed MySQL service preserves the monolith while adding scalability and reliability.
- ✓
Rehost the application on Compute Engine and use Cloud SQL for MySQL as the database.
Why this is correct
Rehosting on Compute Engine with Cloud SQL for MySQL lifts and shifts the application with minimal code change, satisfying the minimise-changes constraint. Cloud SQL adds managed backups and high availability, improving reliability and scalability over the single on-premises server.
- ✗
Containerize the application with Docker and run it on Cloud Run.
Why it's wrong here
Cloud Run runs stateless containers, so the application's local MySQL dependency and any on-disk state would break; code changes are needed. Cloud Run is correct for stateless HTTP services that can externalise state to a managed database.
- ✗
Migrate the database to Firestore and rewrite the application to use Firestore APIs.
Why it's wrong here
Firestore is a NoSQL document store, so the application's SQL queries and schema would need rewriting, violating the minimal-code-change requirement. Firestore is correct when building new applications that tolerate denormalised document data and horizontal scaling without relational joins.
Go deeper
Related to this question
Learn chapter
Google Kubernetes Engine (GKE)
Key term
Cloud SQL
Cloud SQL is a fully managed relational database service that lets you set up, maintain, and scale SQL databases (like MySQL, PostgreSQL, and SQL Server) in the cloud without managing the underlying infrastructure.
Key term
Compute Engine
Compute Engine is Google Cloud's Infrastructure-as-a-Service (IaaS) offering that lets you create and run virtual machines on Google's infrastructure.
About these practice questions
One of 807 original PCA 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 →
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.