Apache Flink
- Problem solved: process continuous streams with distributed state, low latency and exact results even after a failure (exactly-once), and run batch on the same engine.
- Era: Stratosphere research project started in 2009 at TU Berlin; Apache Incubator on April 14, 2014, renamed Flink on May 14, 2014, top-level project on December 17, 2014. Flink 1.0 in March 2016, Flink 2.0 in March 2025.
- Created by: the Stratosphere team (TU Berlin with HU Berlin, Hasso Plattner Institute, KTH, ELTE), including Stephan Ewen and Kostas Tzoumas, co-founders of data Artisans (later Ververica).
- Category: stateful stream processing engine (and batch).
Historical context
In 2009, Hadoop dominates large-scale data processing. Stephan Ewen recalls: "When we started in 2009 with the work on Stratosphere, Hadoop was all the rage". At TU Berlin, with HU Berlin, the Hasso Plattner Institute, KTH in Stockholm and ELTE in Budapest, the Stratosphere research project starts that year, and Flink grows out of it.
The code enters the Apache Incubator on April 14, 2014. One month later, on May 14, the community votes for a new name: "Stratosphere" was, according to Ewen, a registered trademark "in so many industries". It becomes Flink, "quick and nimble" in German. The project leaves the incubator as early as December 17, 2014; the ASF announces it on January 12, 2015, with more than 70 contributors, and notes that several committers have just founded data Artisans, a Berlin-based startup.
In 2015, Flink bets on streaming: "2015 is when Flink went all in on stream processing", says Ewen. The same year, Paris Carbone, Ewen, Tzoumas and their co-authors publish the Asynchronous Barrier Snapshotting (ABS) algorithm, contributed to Flink "to provide exactly-once processing semantics". Flink 1.0 ships on March 8, 2016 with the RocksDB state backend, savepoints and a CEP library.
The industrial turning point comes from China. Alibaba uses Flink from 2016 for search and recommendation during Double 11 (Singles' Day) and makes it its real-time computing standard in 2017; internally, the company maintains a fork called Blink. In January 2019, Alibaba acquires data Artisans (EUR 90M according to the press) and announces that Blink will be contributed to Flink; the Blink query processor arrives as a preview in Flink 1.9 (August 2019). In 2020, Alibaba reaches a peak of 4 billion records per second during Double 11.
On March 24, 2025, Flink 2.0 is the "first major release since Flink 1.0 launched nine years ago": state can now live on remote storage (disaggregated state), designed for the cloud.
Key idea
In Flink, the stream is the general case: a batch job is only a bounded stream ("a special case of streaming programs"). Each operator keeps a local state (counters, windows, join tables), and Flink regularly takes a consistent picture of all these states without stopping the stream. After a failure, it reloads the last picture and replays the source from the matching position: each event counts exactly once in the state.
How it works
- JobManager and TaskManagers: a program is a dataflow (sources, transformations, sinks). The JobManager schedules tasks, "coordinates checkpoints" and drives recovery after failures; the TaskManagers (workers) run tasks in task slots and exchange the streams. Flink runs on YARN, Kubernetes or as a standalone cluster.
- Checkpoint barriers: the source injects barriers into the stream; they "never overtake records". When an operator has received the barrier on all its inputs, it saves its state. The algorithm is "inspired by the standard Chandy-Lamport algorithm for distributed snapshots".
- Aligned or unaligned checkpoints: since Flink 1.11, checkpoints can be taken "with or without alignment"; the unaligned mode is "closer to the Chandy-Lamport algorithm".
- State backends: state lives in memory or in RocksDB (since 1.0); in 2.0 it can reside on a remote file system.
- Savepoints: manually triggered snapshots to upgrade or migrate a job without losing its state.
- Event time: windows and watermarks compute according to when the event happened, not when it arrived.
- Watch out: "By default, checkpointing is disabled", it must be enabled.
StreamExecutionEnvironment env =
StreamExecutionEnvironment.getExecutionEnvironment();
env.enableCheckpointing(10_000); // a snapshot of the state every 10 s
DataStream<String> words = env.socketTextStream("localhost", 9999);
words.keyBy(String::toString) // partition the stream by word
.process(new CountPerWord()) // stateful function: one counter per word
.print();
env.execute("word-counter");
By the numbers
| Figure | Context | Source |
|---|---|---|
| 1 month | Between entering incubation (April 14, 2014) and the vote for the Flink name (May 14, 2014) | Incubator page |
| More than 70 | Contributors when leaving the incubator (January 2015) | ASF announcement 2015 |
| 64 and 450 | Contributors and JIRA issues of Flink 1.0 (March 2016) | Flink 1.0 announcement |
| 10x | Average TPC-H gain of the Blink engine over Flink 1.6.0 (2019) | Flink blog 2019 |
| EUR 90M | Price of Alibaba's acquisition of data Artisans (January 2019) [S] | TechCrunch |
| 4 billion | Records per second at the Double 11 peak at Alibaba (2020) | Alibaba Cloud blog |
| 165, 25, 369 | Contributors, FLIPs and issues of Flink 2.0 (March 2025) | Flink 2.0 announcement |
Milestones
- 2009: the Stratosphere research project starts at TU Berlin.
- April 14, 2014: enters the Apache Incubator.
- May 14, 2014: Stratosphere becomes Flink.
- December 17, 2014: Apache top-level project (announced on January 12, 2015).
- 2015: ABS paper; Flink goes all in on streaming.
- March 8, 2016: Flink 1.0 (RocksDB, savepoints, CEP).
- 2016: first use at Alibaba's Double 11; group-wide real-time standard in 2017.
- January 2019: Alibaba acquires data Artisans; Blink contribution announced on February 13.
- August 22, 2019: Flink 1.9, preview of the Blink query processor.
- March 24, 2025: Flink 2.0, disaggregated state and Apache Paimon integration.
Did you know?
- A squirrel for speed. "Flink just means quick and nimble in German", Ewen explains, a name that lent itself to "a cute squirrel as the mascot".
- Criticised by Google, then an ally. In 2015, Google's Dataflow paper faults "Stratosphere/Flink" for limited window triggering semantics in event-time mode. A few months later, data Artisans co-signs the Beam proposal and writes its Flink runner.
- A fork comes home. Blink was "a fork of Apache Flink, originally created inside Alibaba". The acquisition of data Artisans made it possible to contribute it back to the project.
- Nine years between two major versions. Flink 1.0 ships in March 2016 and Flink 2.0 in March 2025, "nine years" later, according to the official announcement.
Strengths and limitations
| Strengths | Limitations |
|---|---|
| True record-at-a-time streaming, with event time | Learning curve (time, state, watermarks) |
| Distributed state and exactly-once through asynchronous snapshots | Checkpointing disabled by default, must be configured |
| Batch and streaming on the same engine | In a shared session cluster, a TaskManager crash fails every job running on it |
| Proven scale: 4 billion records per second at Alibaba (2020) | Smaller ecosystem than Spark's |
What came next
- Often fed by Kafka upstream: Flink 1.0 already ships Kafka 0.8 and 0.9 connectors.
- Beam can target Flink as a runner.
- It succeeds Storm, whose basic guarantee was at-least-once.
- Flink 2.0 integrates with Apache Paimon for the real-time lakehouse, to be compared with table formats like Iceberg.
Sources
raw-data/apache/flink/flink.md- https://incubator.apache.org/projects/flink.html
- https://news.apache.org/foundation/entry/the_apache_software_foundation_announces69
- Carbone et al., "Lightweight Asynchronous Snapshots for Distributed Dataflows", 2015, https://arxiv.org/abs/1506.08603
- https://nightlies.apache.org/flink/flink-docs-stable/docs/concepts/stateful-stream-processing/
- https://nightlies.apache.org/flink/flink-docs-stable/docs/concepts/flink-architecture/
- https://flink.apache.org/2016/03/08/announcing-apache-flink-1.0.0/
- https://flink.apache.org/2019/02/13/batch-as-a-special-case-of-streaming-and-alibabas-contribution-of-blink/
- https://flink.apache.org/2019/08/22/apache-flink-1.9.0-release-announcement/
- https://flink.apache.org/2025/03/24/apache-flink-2.0.0-a-new-era-of-real-time-data-processing/
- https://www.alibabacloud.com/blog/597131
- https://www.ververica.com/blog/reintroducing-ververica
- https://sudipchakrabarti.substack.com/p/flink-the-unified-stream-and-batch
- Akidau et al., "The Dataflow Model", VLDB 2015, https://www.vldb.org/pvldb/vol8/p1792-Akidau.pdf
- [S] https://techcrunch.com/2019/01/08/alibaba-data-artisans/
- Acquisition price (EUR 90M): secondary source only; data Artisans' primary post from January 2019 not read.
- Exact date of the rename of data Artisans to Ververica.
- Release date of Flink 1.11 (unaligned checkpoints).
- Limitations "learning curve" and "smaller ecosystem than Spark's": carried over from the previous page, plausible but unsourced.