Graph
Late Data Handling

🕰️Late Data Handling

NEW

Techniques for managing out-of-order events that arrive after their intended event-time window closes.

DESCRIPTION

Late data handling controls how streaming systems treat events that arrive after their event-time window has emitted results. Common strategies include watermarking, allowed lateness, and updates with upserts. Policies range from dropping late events to retractions and corrections for previously computed outputs. Correctness and user expectations must balance against latency and state cost. Monitoring lateness distributions helps set robust watermark and timeout values. Frameworks often support incremental state updates and idempotent sinks to safely revise results.

ALTERNATIVE DEFINITIONS

Apache Spark

To handle late data, Structured Streaming uses watermarking to track the event time progress and clean up state accordingly.

Explains watermarking as the core mechanism to bound lateness and state.

Source

Apache Beam

Watermarks are used to estimate progress in event time and determine when all data in a window has likely been observed.

Focuses on probabilistic completeness and event-time progress.

Source

Google Cloud

A watermark is a threshold that indicates that the system believes it has seen all of the data up to a certain event time.

Defines watermarks as thresholds for event-time completeness assumptions.

Source

Watermarking Windowing Event Time Out-of-Order Events Stateful Processing Reprocessing Entity Matching Exactly-Once Processing Backpressure

COMPETING TERMS

Processing-Time Windows

KNOWLEDGE AREAS

Real-time & Streaming Data Data Engineering Data Quality

TARGET AUDIENCE

Data Engineer MLOps Engineer Data Architect Data Steward

EXTERNAL SOURCES

TOP QUESTIONS

Why is Late Data Handling crucial in event-time processing?

Real-world events often arrive out of order due to network delays or retries. Proper handling preserves correctness without unbounded latency or state growth.

Category: Relevancy

What is allowed lateness in Late Data Handling?

Allowed lateness is a grace period after window closure during which late events can still update results before state is finalized and purged.

Category: Concepts

How do watermarks influence Late Data Handling?

Watermarks estimate completeness and determine when windows can close. They balance timeliness against the risk of late-arriving updates.

Category: Behavior

What are common mistakes in Late Data Handling?

Setting watermarks too aggressively drops valid late events; too conservatively increases latency and state costs.

Category: Mistakes

How can I update outputs when late data arrives?

Use upserts, retractions, and idempotent sinks. Many systems support correcting prior aggregates with changelogs.

Category: Implementation

How do I choose lateness thresholds in Late Data Handling?

Analyze historical lateness distributions and SLA requirements, then iterate with monitoring to refine thresholds.

Category: Best Practices

What is the impact of Late Data Handling on storage?

Longer allowed lateness increases state retention and storage costs. Bound windows and TTLs to control growth.

Category: Performance

Can Late Data Handling achieve exactly-once semantics?

Yes, with consistent checkpoints and transactional sinks, systems can produce correct updates even with late arrivals.

Category: Guarantees

How does Late Data Handling differ from processing-time windows?

Processing-time windows ignore event-time order, trading correctness for simplicity and lower latency.

Category: Alternatives