Windows, grace, state
Windows + state
Three canonical window types:
- Tumbling — fixed, non-overlapping intervals (
1m). - Hopping — fixed intervals, overlap (
1m advance 10s). - Session — variable, driven by inactivity gap.
Each window aggregation has a state store (RocksDB by default), checkpointed to a compacted changelog topic so failover replays exactly.
Event-time vs processing-time matters: late records arriving after the window's grace period are dropped. Set the grace honestly.