DataLane

All stacks · Compute & processing

Apache Flink

Stateful stream processing, watermarks, and exactly-once sinks.

Apache Flink cover

About Apache Flink

Flink is the stateful stream processor: event time, watermarks, checkpoints, and sinks that can actually claim exactly-once. Spark Structured Streaming is micro-batch with a streaming costume; Flink is the engine you pick when state and lateness are the product.

These notes cover the interview and production questions: watermarks, savepoints vs checkpoints, and when Flink is overkill compared with Kafka Streams or a warehouse Dynamic Table.

What you'll learn here

  • Event time vs processing time and why your dashboard lies without watermarks
  • Checkpoints, savepoints, and restart stories
  • Exactly-once sinks and the idempotent key you still need
  • Flink vs Spark Structured Streaming vs warehouse streaming SQL

Frequently asked questions

When do I pick Flink over Spark Streaming?

Low-latency stateful jobs, large keyed state, and true event-time windows with late data. Spark is fine for micro-batch ETL that happens to read Kafka. If you are explaining watermarks in the design review, you probably want Flink.

What does exactly-once actually mean here?

The Flink checkpoint barrier plus a transactional or idempotent sink. “Flink is exactly-once” without a sink contract is marketing. Dual-write without a key is still at-least-once in practice.

Do I need Flink if I have Snowflake Dynamic Tables?

Not for warehouse-latency SQL. You need Flink when the serving path is a stream, a keyed store, or a sub-minute product SLA the warehouse cannot hit. Most analytics teams do not need Flink first.

New Apache Flink posts, straight to your inbox

One email a week with our latest tutorials. No spam.

Newsletter signup is not live yet. Use the contact form if you want to be notified.

↑↓ navigate openesc close