Skip to content
PHP2Shell: The PHP Bug
Akshay Thakare

Batch vs Streaming: Choosing the Right Pipeline

Latency requirements, correctness, cost and operations — a practical framework for the most common data system design question.

Data Engineering System DesignIntermediate3 min readUpdated 11 Oct 2026

Start from the requirement, not the tool

Ask: how stale can the answer be before it loses value? If the honest answer is "hours", streaming adds cost and operational risk for no benefit.

Two shapes

Batch
Sourcesdaily snapshot
Extractbounded window
Lakeimmutable files
Warehouseone transaction
Dashboardrefreshed hourly
Streaming
Eventscontinuous
Stream jobwindows + state
Sinkupserts
Servingseconds fresh
Alertsreal time

Comparison

ConcernBatchStreaming
FreshnessMinutes to hoursSeconds
CorrectnessEasy to reason about; replay a windowNeeds event time, watermarks, late-data handling
CostCompute only while runningAlways-on clusters and brokers
OperationsRerun the jobOffsets, state stores, back-pressure, schema evolution
Typical useFinance reporting, ML features, daily KPIsFraud detection, IoT monitoring, live personalisation

A decision path

  1. 1

    Define the freshness SLA

    Write it down in minutes. "Real time" is not a number.
  2. 2

    Check the consumers

    A dashboard refreshed hourly gains nothing from second-level data.
  3. 3

    Consider micro-batch

    Running a batch job every 5–15 minutes often meets the SLA with batch simplicity.
  4. 4

    Go streaming when the action is immediate

    Blocking a fraudulent payment or reacting to a sensor needs true streaming.

Finished this note?

Share