# Apache Flink

> A free tool that works on each event as soon as it comes in.

**Field:** Data Engineering  
**Category:** Processing  
**Also known as:** Flink, Flink SQL

## Think of it like

It is like a cashier who rings up each item the moment it hits the belt. There is no waiting for the full cart.

## Definition

Apache Flink is a free, open source engine for processing streams of events one at a time. It works on event time, so late events still land in the right window. It keeps state, such as running totals, and saves it often in checkpoints. After a crash it starts from the last checkpoint, which gives exactly-once results. It also runs batch jobs and has a SQL layer.

## Example

A bank runs Flink on its card payments. It flags a card used in two countries within ten minutes, about a second after the second payment.

## Why it matters

It gives low delay and correct results at the same time. That is why fraud, pricing and alert systems use it.

## Common mistake

Letting state grow forever. Set a time limit on old keys, or they fill the memory.

## Three principles

- **Event at a time.** Not small batches.
- **Event time.** Late events land right.
- **Checkpointed state.** Exactly-once after a crash.

## Related terms

- [Stream Processing](https://learn.benibix.com/term/data/stream-processing)
- [Event Time](https://learn.benibix.com/term/data/event-time)
- [Checkpointing (Stream Processing)](https://learn.benibix.com/term/data/checkpointing)
- [Apache Kafka](https://learn.benibix.com/term/data/apache-kafka)
- [Spark Structured Streaming](https://learn.benibix.com/term/data/spark-structured-streaming)

## Told apart from

- [Apache Flink vs Spark Structured Streaming](https://learn.benibix.com/compare/apache-flink-vs-spark-structured-streaming): People think Apache Flink and Spark Structured Streaming do the same thing at different speeds, and that is close but not all of it. Flink handles each event as it arrives, in milliseconds. Spark gathers events into tiny batches and runs the same code it uses for batch jobs. Pick Flink for speed and big state, and Spark to reuse what your team knows.

---

Source: https://learn.benibix.com/term/data/apache-flink
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
