Designing highly scalable, available, and reliable cloud-native applications →hardMultiple ChoiceObjective-mapped
Data Durability for Stateful Apps on Compute Engine with Local SSDs
A company runs a stateful application on Compute Engine instances with local SSDs. They need to perform maintenance that requires stopping the instances. What is the best approach to ensure data durability and minimal downtime?
Quick Answer
The correct approach is to migrate data to persistent disks and configure the application to use persistent disks. This is because local SSDs provide ephemeral storage that is physically attached to the Compute Engine host, meaning their data is permanently lost the moment the instance is stopped or terminated—making them unsuitable for any stateful workload requiring data durability during maintenance. On the Google Professional Cloud Developer exam, this scenario tests your understanding of the fundamental trade-off between local SSD performance and persistent disk durability; a common trap is assuming that snapshots or backups can protect local SSD data during a stop, but snapshots are only possible while the instance is running. The key distinction is that persistent disks are network-attached and survive instance lifecycle events, while local SSDs do not. Memory tip: “Local is lost, persistent persists”—if you need the data to survive a stop, always choose persistent disks.
⚠ Common exam trap
Many exam-takers assume local SSDs can be snapshotted or that live migration works with local SSDs, but Google Cloud explicitly disables both features for local SSDs, making persistent disks the only durable option for stateful workloads requiring maintenance.
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
✓
Migrate data to persistent disks and configure the application to use persistent disks
Local SSDs provide ephemeral storage that is tied to the lifecycle of the Compute Engine instance. When an instance is stopped or terminated, data on local SSDs is permanently lost. To ensure data durability during maintenance that requires stopping the instance, the application must use persistent disks, which are durable network-attached storage that persists independently of the instance. Option D is correct because migrating the application to persistent disks ensures data survives the stop and allows the instance to be restarted with the same data, minimizing downtime.
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 snapshot of the local SSD before stopping the instance
Why it's wrong here
Local SSDs cannot be snapshotted; they are ephemeral.
- ✗
Use instance groups with autohealing to automatically recreate instances
Why it's wrong here
Autohealing recreates instances but does not preserve local SSD data.
- ✗
Enable live migration on the instance
Why it's wrong here
Live migration works for instances with persistent disks, not local SSDs. Local SSDs prevent live migration.
- ✓
Migrate data to persistent disks and configure the application to use persistent disks
Why this is correct
Persistent disks are durable and can be detached and reattached to other instances, ensuring data persistence during maintenance.
Go deeper
Related to this question
About these practice questions
This PCD question is part of Courseiva's 964-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on PCD
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company runs a stateful application on Compute Engine with local SSDs. They want high durability. Which approach should they use?
medium- A.Replicate data to another zone using synchronous replication
- B.Use a RAID 1 array across multiple local SSDs
- C.Take regular snapshots of local SSDs
- ✓ D.Use persistent disks instead of local SSDs for automatic replication
Why D: Local SSDs are ephemeral and data is lost when the VM is stopped or terminated. Persistent disks, by contrast, automatically replicate data within the same zone (or across zones if using regional persistent disks), providing high durability. Option D correctly identifies that switching to persistent disks is the appropriate approach for durability, as local SSDs lack built-in redundancy.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCD 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 PCD exam.