Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
You are designing a distributed order-fulfillment workflow on Google Cloud. When a customer places an order, a Cloud Run service must trigger a Workflows execution to process payment and call a third-party shipping API.
Your architecture has the following requirements:
429 errors during flash sales.Which solution should you implement?
Pub/Sub is a global, event-driven messaging service built for implicit invocation, decoupling event publishers from subscribers so that publishers have no knowledge of or control over how or when subscribers process messages.
max_dispatches_per_second rate shaping; during a flash sale, a sudden surge of published events can overwhelm the Workflows Executions API with concurrent requests.The architecture required implicit fan-out to multiple independent downstream subscribers (such as analytics, billing, and notifications simultaneously) without requiring scheduled delivery, explicit QPS dispatch caps, or creation-time deduplication.
Choosing between Pub/Sub and Cloud Tasks centers on implicit versus explicit invocation; whenever a producer must dictate when, where, and how fast a specific endpoint is invoked, a task queue is the appropriate tool.
Cloud Tasks is a fully managed asynchronous task execution service that uses explicit invocation to dispatch independent units of work to HTTP endpoints—including the Cloud Workflows Executions API—outside of the main user request flow.
OK once Cloud Tasks persists the task, allowing the checkout request to return quickly without blocking on fulfillment.max_dispatches_per_second and max_concurrent_dispatches on the queue buffers sudden bursts from flash sales and prevents downstream Workflows concurrency quotas from being exceeded or returning HTTP 429 errors.workflowexecutions.googleapis.com endpoint directly using an OAuth token from a service account granted roles/workflows.invoker.429 or 5xx responses and retries according to queue-level RetryConfig settings.Unlike event-driven messaging systems designed for decoupled fan-out, Cloud Tasks gives the producer full control over execution timing, dispatch rate shaping, and task deduplication, making it the ideal buffer for rate-sensitive Workflows orchestrations.
A Pub/Sub pull subscription requires worker processes to actively pull messages from a topic. Client-side flow control caps how many unacknowledged messages a single subscriber holds in memory, while ordering keys ensure messages sharing the same key are delivered in the sequence they were published.
max_dispatches_per_second rate across all workers hitting the Workflows API.You were building a high-throughput, global event-ingestion pipeline where pull-based workers process streams in strict sequential order per entity key (such as user ID) without needing scheduled future execution or creation deduplication.
Students often confuse Pub/Sub ordering keys and flow control with Cloud Tasks scheduling and rate limits; ordering controls sequence, whereas Cloud Tasks controls dispatch timing and rate.
In this pattern, the Cloud Run service directly calls the Workflows Executions API during the customer's HTTP request and waits for the API response before replying, relying on client-side retries and Workflows execution backlogging to manage concurrency spikes.
The caller needed a synchronous result immediately before responding to the user, and there were no requirements for asynchronous decoupling, scheduled future execution, or task-creation deduplication.
Offloading work to Cloud Tasks isolates user-facing latency from downstream quota pressure, converting brittle synchronous retries into durable, rate-controlled asynchronous execution.
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 Validated