Stream processing
Queries that never finish: they read events as they arrive and keep results, counts and joins up to date.
16 technologies on this page ↓How it works
A stream processor runs a query that never ends: it reads events from a stream, such as a Kafka topic, and emits results while new events keep arriving. Stateless steps, like filtering or reshaping, look at one event at a time. Stateful steps remember things between events: a join holds events until their match arrives, and an aggregation keeps a running count per key. Aggregations are cut into windows: tumbling (back-to-back minutes), hopping (overlapping, say five minutes long and starting every minute) or session (closed after a quiet gap). Windows usually follow event time, when something happened, rather than processing time, when it arrived, and a watermark says how far event time has got, so the processor knows when a window is complete. The work is split by key across parallel tasks, each keeping its state locally, in memory or in RocksDB. The processor saves that state together with its input positions (Flink in periodic checkpoints, Kafka Streams in changelog topics), so after a crash it resumes without losing or double-counting events. Exactly-once output also needs a sink that takes part, through transactions or idempotent writes.
A tally clerk at a stadium’s gates. Instead of counting everyone from the CCTV recording the next morning, they keep a running count per gate on a clipboard, call out a total every fifteen minutes, and photocopy the clipboard now and then so a stand-in can carry on from that point if they leave.
Reach for it when
- Live metrics, counters and dashboards that have to be seconds old, not hours
- Fraud, anomaly and alerting rules over a window of recent events per key
- Joining or enriching one stream with another, or with a table kept current by change data capture
- Streaming ETL: cleaning, reshaping and routing events on their way into a warehouse or lakehouse
Think twice when
- An answer that’s an hour old is fine; a scheduled batch query is easier to write, test and rerun
- Questions you can’t plan in advance; a stream job only answers the query it was started with
- Each event just triggers one action, such as sending an email; a queue and workers are simpler
- Nobody can look after it: long-running stateful jobs need checkpoints, upgrades and watching for lag and growing state
A real example
Card payments arrive on a payments topic, keyed by card number. A Flink job counts declined payments per card in one-minute tumbling windows by event time, with a watermark ten seconds behind the newest event so stragglers still count. More than five declines in a minute sends an alert. When a worker dies, the job restarts from its last checkpoint and rereads the topic from the offsets stored in it, so no decline is lost or counted twice.
Technologies
Specific products, and what each does differently.
Distributed stream processing engines
Run a job on a cluster, with checkpointed state.
ArroyoOpen sourceA stream processing engine in Rust: you write the pipeline as SQL, and it keeps windows and joins running with checkpointed state.StreamFusionOpen sourceAn open-source accelerator for Apache Flink SQL: Flink still plans and coordinates the job, while the operators it can reproduce exactly run natively in Rust on Arrow and DataFusion.Streaming databases
Write SQL views; the system keeps them up to date as events arrive.
ksqlDBCommercialConfluent’s SQL server for Kafka: queries that run forever, turning topics into new topics and into tables you can look up.
FelderaOpen sourceAn incremental view maintenance engine in Rust: you write SQL tables and views, and it keeps every view up to date by processing only the changes, based on the award-winning DBSP theory.Libraries inside your app
Stream processing as code in your own service, with no cluster to run.
Quix StreamsOpen sourceA pure-Python library for stateful stream processing on Kafka: a pandas-like Streaming DataFrame, RocksDB state backed up to Kafka, and no cluster of its own.
BytewaxOpen sourceA Python stream processing framework on a Rust engine built on Timely Dataflow; its company wound down in 2025 and the last release is from November 2024.
PathwayCommercialA Python framework for streaming ETL and live RAG pipelines: you write table transformations in Python, and a Rust engine built on Differential Dataflow keeps the results up to date.Pipeline runners
Move and reshape events between systems from a config file.
Redpanda ConnectRenamedOpen sourceFormerly Benthos: one Go binary that runs a YAML pipeline of inputs, processors and outputs, with at-least-once delivery and no disk state of its own.
StreamlingCommercialGoldsky’s young Rust pipeline runtime: YAML pipelines of stateless SQL, TypeScript and plugin steps on Arrow, from Kafka or files into Postgres, ClickHouse or webhooks.| Distributed stream processing engines | Open source | Apache Software Foundation | Apache 2.0 | 2026-10-06 | |
| Distributed stream processing engines | Open source | Apache Software Foundation | Apache 2.0 | 2026-10-05 | |
Arroyo | Distributed stream processing engines | Open source | Cloudflare, Inc. | MIT or Apache 2.0, at your choice (dual-licensed since the first open-source release in 2023) | 2026-10-05 |
| StreamFusion | Distributed stream processing engines | Open source | Jordan Epstein and contributors, in the datafusion-contrib GitHub organization (not an Apache project) | Apache 2.0 (LICENSE file since the repository opened in datafusion-contrib, July 2026) | 2026-10-06 |
| Streaming databases | Open source | RisingWave Labs | Apache 2.0 (since the first open-source release in April 2022); premium features in the same binary need a paid licence key since v2.0 (2024) | 2026-10-06 | |
ksqlDB | Streaming databases | Commercial product | Confluent (an IBM company) | Confluent Community License (source-available, not OSI open source); Apache 2.0 until December 2018 | 2026-10-05 |
Feldera | Streaming databases | Open source | Feldera, Inc. | MIT for the open-source edition (the Rust crates are published as MIT OR Apache-2.0); since May 2026 the repository also contains Enterprise-only code, behind a `feldera-enterprise` feature flag, that needs a paid licence. The engine began at VMware Research, also under MIT | 2026-10-06 |
| Libraries inside your app | Open source | Apache Software Foundation | Apache 2.0 | 2026-10-05 | |
Quix Streams | Libraries inside your app | Open source | Quix Analytics Ltd. | Apache 2.0 (since the first open-source release in March 2023); Quix Cloud, the hosted platform, is proprietary | 2026-10-06 |
Bytewax | Libraries inside your app | Open source | Community-maintained since 2025; built by Bytewax, Inc., which is no longer operating | Apache 2.0 | 2026-10-06 |
Pathway | Libraries inside your app | Commercial product | Pathway Technology Inc. (with its French affiliate NavAlgo SAS) | Business Source License 1.1 (source-available, not OSI open source) since the first public release in July 2023; each version becomes Apache 2.0 four years after merge, and no earlier than July 2027. Scale features need a licence key; Enterprise is under a separate commercial licence | 2026-10-06 |
| Libraries inside your app | Open source | Denormalized (Probably Nothing Labs, Y Combinator Summer 2022), now inactive | Apache 2.0 (from the first commit in July 2024) | 2026-10-06 | |
| Timely Dataflow | Libraries inside your app | Open source | Frank McSherry and contributors (TimelyDataflow project) | MIT (since the first commit in 2014) | 2026-10-06 |
Redpanda ConnectRenamed | Pipeline runners | Open source | Redpanda Data (acquired Benthos in May 2024) | Mixed: the core engine (redpanda-data/benthos) is MIT, most connectors are Apache 2.0, and enterprise connectors and features are under the source-available Redpanda Community License and need a paid licence key; everything was MIT up to Benthos 4.27, and the split came with 4.28 in May 2024 | 2026-10-05 |
Streamling | Pipeline runners | Commercial product | Goldsky (Endless Sky, Inc.) | Functional Source License 1.1 with Apache 2.0 future licence (FSL-1.1-ALv2): source-available, not OSI open source; each version becomes Apache 2.0 two years after its release | 2026-10-06 |
| Other | Commercial product | Cloudflare, Inc. | Proprietary | 2026-10-12 |
What each provider calls it
- AWS
- Managed Service for Apache Flink (named Kinesis Data Analytics until 2023)
- Google Cloud
- Dataflow (Apache Beam)
- Azure
- Stream Analytics
- Open source & others
- Apache Flink (StreamFusion, pre-1.0, runs Flink SQL natively in Rust), Kafka Streams, Spark Structured Streaming, Arroyo; streaming databases and incremental views: Feldera (MIT core, paid Enterprise features), RisingWave (Apache 2.0; premium features need a licence key) and Materialize (BSL); ksqlDB (Confluent Community License); Redpanda Connect for stateless pipelines; Python: Quix Streams, Pathway (BSL), Bytewax (now community-maintained); Rust: Timely and Differential Dataflow, Streamling (FSL)
See it in a real stack
Architectures that use stream processing
In code · sql
-- Flink SQL: page views per minute, by event time, waiting 5 s for stragglers
CREATE TABLE clicks (
user_id STRING,
page STRING,
ts TIMESTAMP(3),
WATERMARK FOR ts AS ts - INTERVAL '5' SECOND
) WITH (
'connector' = 'kafka',
'topic' = 'clicks',
'properties.bootstrap.servers' = 'broker:9092',
'properties.group.id' = 'page-views',
'scan.startup.mode' = 'earliest-offset',
'format' = 'json'
);
-- one row per page per window, emitted once the watermark passes window_end
SELECT window_start, window_end, page, COUNT(*) AS views
FROM TUMBLE(TABLE clicks, DESCRIPTOR(ts), INTERVAL '1' MINUTES)
GROUP BY window_start, window_end, page;Worth exploring
Often confused with
Where it came from2011–2026
For years, “real time” meant queues and hand-written workers. At BackType, Nathan Marz recalled, most of that code dealt with moving and serialising messages rather than the actual logic, so he built Storm to hide the plumbing and released it in September 2011, after Twitter bought BackType. Exact results still came from batch jobs, so many teams ran the same logic twice: fast in a stream job, correct in Hadoop. In 2014 Jay Kreps called maintaining code for the same result in two distributed systems “exactly as painful as it seems like it would be”, and proposed replaying a retained log through the stream job instead.
Google’s MillWheel (2013) and Dataflow Model (2015) papers showed how a stream job could be correct on its own, with exactly-once state, event time, windows and watermarks. Apache Flink, which grew out of the Stratosphere research project and became a top-level Apache project in December 2014, paired those ideas with consistent snapshots of all its state. Kafka Streams (2016) put similar machinery into a library.
Today most engines also speak SQL, and the clouds sell them as services: Google’s Dataflow runs Apache Beam pipelines, Azure has Stream Analytics, and in 2023 AWS renamed Kinesis Data Analytics to Managed Service for Apache Flink, then retired its older SQL engine.
Why it’s built this way
- Keep state inside the processor
- Looking up a database for every event is slow and hammers the database. Keeping counts, windows and join buffers in local memory or RocksDB, split by key across tasks, keeps each step fast.
- Event time and watermarks, not arrival time
- Events arrive late and out of order, and replays arrive all at once. Grouping by when things happened, and using watermarks to decide when a window is done, gives the same answer live and on replay.
- Snapshot state and input positions together
- Writing every update somewhere durable would be too slow. Saving state and offsets as one consistent checkpoint lets a job rewind to that point after a crash, so nothing is lost or counted twice.
- Replay instead of a second batch system
- If the input is kept in a log, fixing a bug means rerunning the stream job from the start, not keeping a separate batch pipeline in step with it.
Timeline
- 2011
Storm is open-sourced at Strange Loop, after Twitter buys BackType
- 2013
Google’s MillWheel paper describes low watermarks and exactly-once processing
- 2014
Flink becomes a top-level Apache project; Kreps questions the Lambda Architecture
- 2015
The Dataflow Model paper sets out event time, windows and watermarks
- 2016
Kafka Streams ships in Kafka 0.10; Spark 2.0 previews Structured Streaming
- 2023
Kinesis Data Analytics becomes Amazon Managed Service for Apache Flink
- 2026
AWS deletes the last Kinesis Data Analytics for SQL applications
- Nathan Marz: History of Apache Storm and lessons learned (2014)
- Jay Kreps (O’Reilly Radar): Questioning the Lambda Architecture (July 2014) · archived copy, original
- Akidau et al.: MillWheel, fault-tolerant stream processing at internet scale (PVLDB 2013; low watermarks, exactly-once)
- Akidau et al.: The Dataflow Model (PVLDB 2015; event time, windowing, watermarks)
- Apache Incubator: Flink project status (renamed from Stratosphere, graduated December 2014)
- Flink docs: Stateful stream processing (checkpoints inspired by Chandy-Lamport)
- Apache Kafka downloads: release date of 0.10.0.0 (May 2016)
- Apache Spark 2.0.0 release notes (first experimental Structured Streaming)
- AWS News Blog: Amazon Managed Service for Apache Flink, renamed from Kinesis Data Analytics (Aug 2023)
- AWS docs: Kinesis Data Analytics for SQL applications discontinuation
Sources30
- Flink docs: Timely stream processing (event time, processing time, watermarks)
- Flink docs: Stateful stream processing (keyed state, checkpoints, exactly once)
- Flink docs: State backends (heap, RocksDB, ForSt)
- Flink docs: Windows (tumbling, sliding, session)
- Flink docs: Fault tolerance guarantees of data sources and sinks
- Flink docs: Window aggregation in SQL (TUMBLE)
- Flink docs: CREATE statements (WATERMARK clause)
- Flink docs: Apache Kafka SQL connector
- Kafka docs: Kafka Streams architecture (tasks, local state, changelog topics)
- Google Cloud docs: Streaming pipelines (tumbling, hopping and session windows, watermarks)
- Google Cloud docs: Dataflow overview (Apache Beam)
- Google Cloud docs: Exactly-once in Dataflow
- AWS docs: What is Amazon Managed Service for Apache Flink?
- Microsoft Learn: Introduction to Azure Stream Analytics
- Microsoft Learn: Stream Analytics windowing functions
- Apache Spark docs: Structured Streaming programming guide
- Cloudflare blog: Cloudflare acquires Arroyo (April 2025)
- Arroyo repository (Apache 2.0)
- RisingWave docs: Introduction
- Materialize docs
- Materialize LICENSE (Business Source License 1.1)
- Confluent Community License FAQ (ksqlDB is source-available)
- Redpanda Connect docs
- Quix Streams docs: Sources
- Pathway LICENSE.txt (BSL 1.1)
- GitHub: bytewax/bytewax issue #560 (project status)
- GitHub: TimelyDataflow/timely-dataflow
- Goldsky blog: Open-sourcing Streamling
- StreamFusion README
- RisingWave docs: Premium features