Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Architect practice bank has 2,335 more like it. Try 10 free: instant score, no account.
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?
Deletion protection prevents users or automated scripts from accidentally deleting an active VM instance via the API or Cloud Console. Diagnostic interrupts (compute.instances.sendDiagnosticInterrupt) are administrative debugging tools used to send non-maskable interrupts (NMI) to a VM for kernel crash dumping and analysis.
compute.instances.setDeletionProtection) only guards against user-initiated compute.instances.delete calls.You needed to safeguard critical, non-ephemeral database instances against accidental deletion while troubleshooting unresponsive kernels with diagnostic dumps.
compute.instances.resume on preempted instances.This approach suggests intercepting the operating system's shutdown signal to stop the preemption process and using the compute.instances.resume API method to revive instances after they are terminated by Compute Engine.
TERMINATED state upon preemption. The compute.instances.resume API only applies to SUSPENDED instances. To restart a stopped Spot VM, compute.instances.start or MIG auto-recreation must be used, which depends on resource availability.The workload was running on standard on-demand VMs temporarily paused with compute.instances.suspend to save memory state during planned maintenance.
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.
An unmanaged instance group contains heterogeneous collections of individual VM instances that you manually manage without automated scaling or self-healing. Live migration moves running virtual machines to a different host system during infrastructure maintenance without interrupting workload execution.
onHostMaintenance=MIGRATE is not supported). When a host event or capacity reclamation occurs, Spot VMs are terminated rather than migrated.You were hosting stateful legacy software on standard on-demand VMs that required static single-zone configurations and zero downtime during hardware maintenance.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated