beginnerbig-data

Stream vs Batch Processing

Process data as it arrives, one event at a time — or wait and process it all together, later.

Key Points

What it is

Batch processing handles data in large, scheduled chunks — e.g. processing a full day's transactions overnight. Stream processing handles data continuously, as individual events arrive, producing results in near real time.

Why it exists

Some business decisions can wait until tomorrow's report; others — like blocking a fraudulent transaction — cannot wait even a few minutes. The distinction between batch and stream processing exists because these two categories of problems have fundamentally different latency requirements and need fundamentally different tools.

Intuition

Batch processing is like doing all your laundry once a week — efficient, but you might be out of clean socks for a few days. Stream processing is like washing each item the moment it gets dirty — always ready, but requires constant, ongoing effort rather than one big efficient session.

When to use

When not to use

Common mistakes

In practice

The choice between batch and streaming shapes the entire data architecture — from nightly ETL jobs feeding a data warehouse (batch) to Kafka-and-Spark-Streaming pipelines feeding live dashboards and fraud models (stream).

Was this concept helpful?

Spot an error or gap? Suggest an edit →

Related concepts

apache-kafkareal-time-data-pipelinesapache-spark-intro
Chirp at me!