As asked
A streaming pipeline aggregates real-time sales totals and serves them on a dashboard. A business user asks: is the number on the dashboard exactly correct right now? How do you explain the consistency guarantees and what engineering choices determine how stale the number can be?
Sample answer outline
The number is accurate as of the latest processed watermark, not wall clock time. Staleness is bounded by the watermark lag (typically the out-of-orderness allowance plus processing lag) plus the sink write interval. The candidate should explain the difference between event time and processing time aggregations, and how choosing processing time gives a smaller latency bound at the cost of missing late events. They should be able to give a realistic expected staleness for a 5-minute Flink aggregation job.
Expect these follow-ups
- What would you change if the business required the number to always reflect events up to exactly 1 minute ago?
- How does this differ in a micro-batch Spark Structured Streaming job?