0
0
GCPcloud~20 mins

Cloud Run jobs for batch work in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
πŸŽ–οΈ
Cloud Run Jobs Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
How does Cloud Run Jobs handle container execution?

Cloud Run Jobs run containers to perform batch work. What happens when a job container finishes its task?

AThe container instance stays running to accept new requests.
BThe container instance is immediately terminated and the job is marked complete.
CThe container instance restarts automatically to run the job again.
DThe container instance is paused and resumed later for the next batch.
Attempts:
2 left
πŸ’‘ Hint

Think about batch jobs that run once and then stop.

❓ Architecture
intermediate
2:00remaining
Choosing Cloud Run Jobs for batch workloads

You have a batch workload that processes files uploaded to Cloud Storage once per day. Which architecture best uses Cloud Run Jobs?

ATrigger a Cloud Run Job daily via Cloud Scheduler to process all new files.
BDeploy a Cloud Run service that listens to HTTP requests and processes files on demand.
CUse Cloud Functions triggered by Cloud Storage events to process each file individually.
DRun a Compute Engine VM that polls Cloud Storage every hour to process files.
Attempts:
2 left
πŸ’‘ Hint

Think about scheduled batch processing that runs once per day.

❓ security
advanced
2:00remaining
Securing Cloud Run Jobs with least privilege

You want to run a Cloud Run Job that accesses a Cloud Storage bucket. What is the best practice to grant access securely?

AUse the default Compute Engine service account with Owner role for the job.
BMake the Cloud Storage bucket public so the job can access it without credentials.
CAssign the Cloud Run Job's service account the Storage Object Viewer role on the bucket.
DEmbed a user’s personal credentials inside the container to access the bucket.
Attempts:
2 left
πŸ’‘ Hint

Follow the principle of least privilege for service accounts.

❓ Configuration
advanced
2:00remaining
Configuring parallelism in Cloud Run Jobs

You want to run a Cloud Run Job with 10 parallel tasks to speed up batch processing. Which configuration achieves this?

ASet the job's max instances to 10 but keep task count at 1.
BDeploy 10 separate Cloud Run services each running one task.
CConfigure the job to run a single task with 10 threads inside the container.
DSet the job's task count to 10 and max parallelism to 10 in the job spec.
Attempts:
2 left
πŸ’‘ Hint

Cloud Run Jobs support task count and parallelism settings.

βœ… Best Practice
expert
2:00remaining
Handling retries and failures in Cloud Run Jobs

You run a Cloud Run Job that processes data batches. Sometimes tasks fail due to transient errors. What is the best practice to handle retries?

AImplement retry logic inside the container code and configure the job to not retry failed tasks.
BConfigure Cloud Run Job to automatically retry failed tasks with exponential backoff.
CManually rerun the entire job when any task fails.
DIgnore failures and rely on logs to manually check for errors.
Attempts:
2 left
πŸ’‘ Hint

Cloud Run Jobs do not have built-in automatic retries for tasks.