Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
An analytics firm processes asynchronous, fault-tolerant batch workloads on Google Cloud. To minimize infrastructure costs, the engineering team decides to deploy the worker nodes on Spot Virtual Machines (VMs) managed by a regional Managed Instance Group (MIG).
The architecture must satisfy the following operational requirements:
Which strategy should you implement to handle preemption and maintain workload resilience?
Configure VM instances to reject ACPI shutdown signals, and use an automated Cloud Function to invoke compute.instances.resume on preempted instances.
Deploy the instances in a single-zone unmanaged instance group, and set the instance scheduling policy to live migrate during host maintenance events.
Enable deletion protection on the VM instances, and configure a startup script to capture checkpoint data when receiving a diagnostic interrupt signal.
Implement a shutdown script or monitor the metadata server for preemption notices to save checkpoint data, and configure the regional Managed Instance Group to automatically recreate preempted instances across zones.
Configure VM instances to reject ACPI shutdown signals, and use an automated Cloud Function to invoke compute.instances.resume on preempted instances.
Deploy the instances in a single-zone unmanaged instance group, and set the instance scheduling policy to live migrate during host maintenance events.
Enable deletion protection on the VM instances, and configure a startup script to capture checkpoint data when receiving a diagnostic interrupt signal.
Implement a shutdown script or monitor the metadata server for preemption notices to save checkpoint data, and configure the regional Managed Instance Group to automatically recreate preempted instances across zones.
Spot VMs (and preemptible VMs) provide excess compute capacity at significant discounts compared to standard VM instances. However, Compute Engine can reclaim this capacity at any time when resources are needed elsewhere. When preemption occurs, Compute Engine issues a preemption notification via the metadata server and sends an ACPI power-off signal, providing a 30-second grace period before forcibly terminating the instance.
shutdown-script) or having a daemon poll http://metadata.google.internal/computeMetadata/v1/instance/preempted, the worker process is immediately notified of impending termination. It can flush state, commit progress, and upload checkpoints to Cloud Storage within the 30-second window.Combining automated shutdown handlers with a multi-zone regional MIG provides high availability, cost optimization, and resilience against sudden compute volatility.