Stream Processing Architectures • Event Time vs Processing TimeEasy⏱️ ~2 min
What is Event Time vs Processing Time?
Core Definition
In distributed stream processing systems, Event Time is when something actually happened in the real world (embedded in the event payload), while Processing Time is when your system processes that event (based on the machine clock doing the work).
❗ Remember: In a live system under load, median processing delay might be 200 milliseconds, but 99th percentile could be multiple seconds or minutes. This gap between event time and processing time is why the choice matters.
Modern stream processing architectures must choose which notion of time anchors their logic. That choice affects everything: windowing, aggregations, alerting, billing, and how you handle late or out of order events.💡 Key Takeaways
✓Event time represents when something actually happened in the real world and is embedded in the event payload as an immutable timestamp
✓Processing time is when your system processes the event based on the wall clock of the machine doing the work
✓The gap between event time and processing time is unpredictable: median might be 200 milliseconds but 99th percentile can reach multiple seconds or minutes due to network jitter and backpressure
✓Using processing time for business metrics like revenue per hour or user actions per minute produces silently wrong results when network delays or system load varies
📌 Examples
1A rider requests a trip at exactly 3:45:23 PM. Due to mobile network delays, the event reaches your stream processor at 3:45:27 PM. Event time is 3:45:23, processing time is 3:45:27.
2During a regional network outage, events might be delayed by several minutes. If you use processing time windows, you see a false dip during the outage, then an artificial spike when connectivity is restored and the backlog flushes.