0
0
GCPcloud~20 mins

Cloud Tasks for async processing in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud Tasks Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does Cloud Tasks handle task retries by default?

When a task in Cloud Tasks fails to execute, what is the default behavior for retries?

ACloud Tasks retries the task immediately without delay until it succeeds.
BCloud Tasks retries the task only once after a fixed delay of 5 minutes.
CCloud Tasks does not retry failed tasks automatically; manual retry is required.
DCloud Tasks retries the task with exponential backoff and a maximum retry limit.
Attempts:
2 left
💡 Hint

Think about how systems avoid overwhelming services with repeated immediate retries.

Architecture
intermediate
2:00remaining
Best architecture to process user uploads asynchronously with Cloud Tasks

You want to process user-uploaded images asynchronously to avoid blocking the upload response. Which architecture best uses Cloud Tasks?

AUpload images directly to Cloud Storage and process them synchronously in the upload request handler.
BUpload images directly to Cloud Storage, then enqueue a Cloud Task to process the image asynchronously.
CUpload images to the app server, process them immediately, then enqueue a Cloud Task for logging only.
DUpload images to the app server and store them locally before enqueuing a Cloud Task.
Attempts:
2 left
💡 Hint

Consider decoupling upload and processing to improve user experience.

security
advanced
2:00remaining
Securing Cloud Tasks HTTP targets with authentication

You want to ensure that only Cloud Tasks can invoke your HTTP endpoint. Which method provides the best security?

AAllow all requests and rely on IP filtering to restrict access.
BUse a shared secret in the URL query parameters to authenticate requests.
CConfigure Cloud Tasks to add an OIDC token in the Authorization header for the HTTP request.
DUse basic authentication with username and password in the HTTP headers.
Attempts:
2 left
💡 Hint

Think about secure, token-based authentication methods supported by Cloud Tasks.

Configuration
advanced
2:00remaining
Configuring Cloud Tasks queue rate limits

You want to limit your Cloud Tasks queue to process no more than 10 tasks per second. Which configuration achieves this?

ASet the queue's maxRateLimit property to 10.
BSet the queue's maxConcurrentDispatches property to 10.
CSet the queue's maxTasksPerSecond property to 10.
DSet the queue's maxDispatchesPerSecond property to 10.
Attempts:
2 left
💡 Hint

Look for the property that controls how many tasks are dispatched per second.

Best Practice
expert
3:00remaining
Handling task deduplication in Cloud Tasks

You want to ensure that duplicate tasks are not processed multiple times in Cloud Tasks. Which approach is best?

AImplement idempotency in the task handler to safely process repeated tasks.
BSet the queue to discard tasks with identical payloads automatically.
CRely on Cloud Tasks to automatically detect and discard duplicate payloads.
DUse task names with unique IDs and enable task name deduplication in Cloud Tasks.
Attempts:
2 left
💡 Hint

Think about how to handle duplicates at the processing level rather than relying on the queue.