Your company's accounting department needs to run an overnight batch workload every day. You must implement a solution that minimizes the cost to run this workload and automatically retries the batch if an execution fails. What should you do?
A.
Develop an application that runs the batch workload, and deploy the application as a Google Kubernetes Engine (GKE) CronJob.
B.
Develop a web application that listens for incoming requests and deploy the application as a Google Kubernetes Engine (GKE) Deployment. Use Cloud Scheduler to call the HTTP endpoint.
C.
Develop an application that runs the batch workload, and deploy the application as a Cloud Run Job. Use Cloud Scheduler to trigger the Job.
D.
Develop a web application that listens for incoming requests and deploy the application as a Cloud Run service. Use Cloud Scheduler to call the HTTP endpoint.
For running an automated, scheduled, short-lived, and repeatable compute task (a batch workload) while minimizing cost and having automatic retries:
Batch Workload/Retries: A Cloud Run Job is specifically designed for running containers that execute a task and then exit. It natively supports automatic retries on failure, which is a key requirement.
Scheduling:Cloud Scheduler is the native, fully managed service for defining and triggering scheduled tasks, which satisfies the "overnight every day" requirement.
Cost Minimization: Cloud Run Jobs are serverless and only consume resources (and thus incur costs) while the batch task is actively running. This is significantly cheaper and lower overhead than running a persistent GKE cluster (Option A and B) or a continuous Cloud Run Service (Option D), which is designed for continuous request handling, not single batch execution.
[Reference: Google Cloud documentation on Cloud Run Jobs. "Cloud Run jobs are ideal for running code that performs work and then terminates, such as a batch job." and Cloud Scheduler documentation., ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit