Apache Flink
maang.io System Design Series
Apache Flink processes streams a record at a time (not micro-batches), with first-class support for the hard parts of streaming: event time vs processing time, watermarks for out-of-order data, windowing, and large managed state. Its exactly-once guarantee comes from asynchronous barrier snapshots (the Chandy-Lamport algorithm). It's the go-to for stateful, low-latency stream processing.
This deep dive comes in three parts:
- Foundations & Core Concepts — streams, event time, and watermarks.
- Internals — windowing, keyed state (RocksDB backend), and checkpointing/exactly-once, with worked numbers.
- Interview — Staff/Principal Q&A: event-time reasoning and Flink vs Storm vs Spark.