PDE Ingesting and Processing the Data Practice Question
You are designing a streaming pipeline that ingests events from Pub/Sub, enriches them with a machine learning model, and writes the results to BigQuery. The ML model is deployed on Cloud Run and has a high latency (500ms per request). You need to minimize the impact of slow ML inference on the overall pipeline throughput. Which approach should you take?
⚠ Common exam trap
Many candidates assume parallelism (more Dataflow workers) or faster invocation methods (Cloud Functions) can overcome high per-request latency, when the real solution is to batch requests using Dataflow's batch processing capabilities to reduce the number of round trips.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use Dataflow to write events to Pub/Sub, then use a separate Dataflow pipeline that batches calls to Cloud Run.
It uses Dataflow to batch events before sending them to Cloud Run, which amortizes the 500ms per-request latency over multiple events, significantly increasing throughput. By writing events to Pub/Sub and then processing them in a separate Dataflow pipeline with batched calls, you decouple the ingestion from the inference and avoid blocking on each individual request.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use Dataflow to write events to Pub/Sub, then use a separate Dataflow pipeline that batches calls to Cloud Run.
Why this is correct
Decoupling via Pub/Sub allows batching and async processing, improving throughput.
- ✗
Increase the number of Dataflow workers to compensate for the latency.
Why it's wrong here
More workers help but each element still incurs 500ms; batching is more effective.
- ✗
Use Cloud Functions to call Cloud Run and write directly to BigQuery.
Why it's wrong here
Cloud Functions have limited concurrency and would still be slow per invocation.
- ✗
Use Dataflow's ParDo with synchronous calls to Cloud Run for each element.
Why it's wrong here
Synchronous calls per element will cause high latency and reduce throughput significantly.
Go deeper
Related to this question
About these practice questions
This PDE question is part of Courseiva's 890-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.