QuestionQ73

VerifiedPlanning and implementing a cloud solution

A company runs a single batch process on an on-premises server that takes approximately 30 hours to finish. The job runs monthly, can operate offline, and must be restarted if it is interrupted. The job cannot be checkpointed and must complete in a single uninterrupted run within the monthly window. You want to migrate this workload to the cloud at the lowest possible cost. What should you do?

Explanation

Spot VMs have no maximum runtime, but Compute Engine can preempt them at any time, with a best-effort shutdown period of up to 30 seconds. Google recommends Spot VMs only for fault-tolerant workloads that can withstand preemption, ideally ones that save progress so they can pick up where they left off. This 30-hour job cannot checkpoint and must restart from the beginning if interrupted, so a Spot VM (D), a Spot-based managed instance group (A, where CPU-target autoscaling is irrelevant for a single job) or GKE Spot nodes (C) risk losing up to 30 hours of work and repeated reruns. A standard VM that runs only for the monthly job and is stopped afterwards avoids CPU and memory charges between runs; attached resources such as its persistent disk are still billed while it is stopped.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!