How to configure Dataflow hopping windows for real-time aggregation?
Short answer
B Group the data by using a hopping window in a Dataflow pipeline, and write the aggregated data to Memorystore.
Question
Key Takeaways
The requirement to view a rolling time period (last 30s) at a high frequency (every 2s) defines a hopping window, while 'low-latency' dictates the use of an in-memory store like Memorystore.
The correct approach uses a Dataflow hopping window to aggregate data over the last 30 seconds every 2 seconds, storing results in Memorystore for low-latency access.
Common mistake: Selecting a tumbling window (Option A) because it is simpler, not realizing that non-overlapping tumbling windows cannot maintain the context of the last 30 seconds when updating every 2 seconds.
Expert Analysis
Why the Answer Is Correct
Option B is correct because a hopping window with a size of 30 seconds and a hop (interval) of 2 seconds exactly fulfills the requirement to aggregate supply and demand for the 'last 30 seconds, every 2 seconds.' Memorystore is chosen because the question specifies a 'low-latency system for visualization,' and in-memory stores like Redis (Memorystore) provide the necessary speed for real-time dashboards.
Why the Other Options Are Wrong
Option A is incorrect because tumbling windows represent discrete, non-overlapping time buckets; a 2-second tumbling window cannot aggregate data from the previous 28 seconds. Option C is incorrect because session windows group data based on periods of activity separated by gaps, not fixed time intervals. Option D uses the correct windowing strategy but BigQuery is an analytical warehouse better suited for batch or historical analysis, not the sub-second latency required for real-time operational dashboards.
Community Comment Notes
The community overwhelmingly supports Option B, highlighting that hopping windows are designed for overlapping analysis, which is critical for calculating rolling metrics. Comments also clarify that while BigQuery is powerful, the specific requirement for 'low-latency' visualization makes Memorystore the superior storage choice in this context.
Official Reference
https://cloud.google.com/memorystore/docs
This link opens the official vendor documentation in a new tab.
Exam Strategy
When you see a requirement to aggregate 'over X time, every Y time' (where Y < X), immediately identify a hopping window. Look for keywords like 'low-latency' or 'real-time dashboard' to select in-memory storage (Memorystore/Redis) over BigQuery.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 7 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 7
-
raaad 👍 12 Answered B- Hopping Window: Hopping windows are fixed-sized, overlapping intervals. - Aggregate data over the last 30 seconds, every 2 seconds, as hopping windows allow for overlapping data analysis. - Memorystore: Ideal for low-latency access required for real-time visualization and analysis.
-
scaenruy 👍 2 Answered BB. Group the data by using a hopping window in a Dataflow pipeline, and write the aggregated data to Memorystore.
-
Jeyaraj 👍 1OPTION A. (IGNORE MY Previous Comment) Tumbling windows are the best choice for this ride-hailing app because they provide accurate 2-second aggregations without the complexities of overlapping data. This is crucial for real-time decision-making and ensuring accurate visualization of supply and demand. Hopping windows introduce potential inaccuracies and complexity, making them less suitable for this scenario. While they can be useful in other situations, they are not the optimal choice for real-time aggregation with strict accuracy requirements.
-
Jeyaraj 👍 1Option B. Tumbling windows are the best choice for this ride-hailing app because they provide accurate 2-second aggregations without the complexities of overlapping data. This is crucial for real-time decision-making and ensuring accurate visualization of supply and demand. Hopping windows introduce potential inaccuracies and complexity, making them less suitable for this scenario. While they can be useful in other situations, they are not the optimal choice for real-time aggregation with strict accuracy requirements.
-
ashdam 👍 1hopping window is clear but memorystore vs bigquery?? Why memorystore and not bigquery?
Show 2 more comments
-
Jordan18 👍 1why not D?
-
JyoGCP 👍 1 Answered BOption B
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.