PDE Designing Data Processing Systems Practice Question
You are building a real-time fraud detection system using Dataflow. Events from Pub/Sub need to be grouped by user_id within a 5-minute window to detect suspicious patterns. Some events may be delayed by up to 2 minutes. How should you configure the window and trigger to balance accuracy and latency?
⚠ Common exam trap
PDE often tests the misconception that a sliding window is needed for overlapping patterns, but the question specifies grouping by user_id within a 5-minute window, which implies non-overlapping fixed windows; also, candidates may overlook the need for allowed lateness to handle delayed events, opting for no lateness and thus sacrificing accuracy.
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
✓
Fixed window of 5 minutes with allowed lateness of 2 minutes and early trigger every 1 minute
It directly addresses both the accuracy requirement (handling up to 2 minutes of late data) and the latency requirement (emitting early results every 1 minute). A fixed 5-minute window groups events into non-overlapping intervals, which is appropriate for per-user fraud pattern detection. Setting allowed lateness to 2 minutes ensures that events delayed by up to 2 minutes are still included in the correct window, and an early trigger (e.g., repeating every 1 minute) provides low-latency partial results before the window closes. This combination balances completeness and timeliness.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Sliding window of 5 minutes with a 1-minute period and no allowed lateness
Why it's wrong here
A sliding window with a 1-minute period emits overlapping panes, so each event is counted in five separate results, and setting allowed lateness to zero discards the 2-minute-delayed events entirely, breaking accuracy. Sliding windows suit continuous moving averages, not deduplicated per-key grouping.
- ✗
Session window with a gap duration of 5 minutes
Why it's wrong here
Session windows key on activity gaps, not fixed five-minute intervals, so grouping by user_id across a defined period is not achieved. It is tempting because session windows suit per-user behaviour analysis, which would be correct when inactivity gaps define the grouping.
- ✗
Fixed window of 5 minutes with no allowed lateness and default trigger
Why it's wrong here
Discarding late data with no allowed lateness drops events delayed by up to two minutes, harming fraud-detection accuracy. It is tempting because default triggers give the lowest latency, which is correct when completeness matters less than speed.
- ✓
Fixed window of 5 minutes with allowed lateness of 2 minutes and early trigger every 1 minute
Why this is correct
Fixed windows align to epoch boundaries, so a 5-minute window groups events by user_id without overlap. Allowed lateness of 2 minutes retains late-arriving events, satisfying the stated delay constraint. Early triggers every minute emit speculative results, balancing latency against the accuracy gained from late data.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PDE question from scratch — 747 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
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.