# Micro-Batching

> Tiny batches run every few seconds. It feels close to live, but stays simple.

**Field:** Data Engineering  
**Category:** Foundations  
**Also known as:** Micro-Batch, Micro Batch Processing

## Think of it like

It is like a bus that leaves every five minutes. It does not wait to fill up. It does not go for just one person.

## Definition

Micro-batching sits between batch and stream. Data is cut into very small batches, a few seconds' worth each. Each small batch is then run as a normal batch job. The result feels close to live, but the code stays as simple as a batch. The cost is a short, fixed delay.

## Example

Spark Structured Streaming works in micro-batches by default. A job can pick up new rows every ten seconds and add them to a total.

## Why it matters

Many teams want fresh data but not the work of true streaming. Micro-batches give them most of the speed for less effort.

## Common mistake

Calling it real time. Each answer is at least one small batch old.

## Three principles

- **Small and often.** Batches of a few seconds each.
- **Batch code.** Each tiny batch runs like a normal job.
- **Small fixed delay.** Results lag by about one batch.

## Related terms

- [Batch Processing](https://learn.benibix.com/term/data/batch-processing)
- [Stream Processing](https://learn.benibix.com/term/data/stream-processing)
- [Data Pipeline](https://learn.benibix.com/term/data/data-pipeline)

## Taught in

- [Batch and Stream Processing](https://learn.benibix.com/learn/data-foundations/batch-and-stream-processing): Data Engineering Basics, 5/11

---

Source: https://learn.benibix.com/term/data/micro-batching
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-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
