# Batch or streaming: choose by the decision, not the fashion

> The right latency for a data flow depends on the decision it feeds and on how quickly someone or something can act on a fresher answer, and streaming is worth its extra operating cost only where such an action exists.

Data engineering · Technology comparison · November 17, 2026 · 7 minute read · By Nabil Ahmed
Canonical: https://farside.works/insights/batch-or-streaming/

![The lunar surface near 58°N, 151°E, lit by a low Sun with night falling across one side.](https://farside.works/content/images/2026/11/batch-or-streaming.webp)

"Real time" is one of the most expensive phrases that can appear in a requirements document. The person who writes it usually means "not as slow as today", the architect who reads it hears "streaming", and what gets delivered is a platform that updates a dashboard every second for people who look at it once each morning.

Batch processing collects data over a period and processes it together on a schedule, while stream processing handles each event, or a very small group of events, continuously as it arrives. Both approaches are mature and neither is more modern than the other, but their costs fall in different places, since batch costs you waiting time and streaming costs you engineering and operations effort.

Our position is that the choice should be made for each data flow separately, starting from the decision the data feeds. That means asking who or what acts on the result and how much a fresher answer would change the action. If nothing can act within the hour, data that is a minute old is worth no more than data that is an hour old, and it costs considerably more to produce.

## In brief

- The latency a data flow needs depends on how quickly its consumer can act, and how quickly the data could be delivered is largely beside the point.
- Stream processing brings lasting engineering and operating costs that batch processing largely avoids, including ordering, late data, state management and continuous on-call cover.
- Micro-batch, which runs every few minutes, meets most requests labeled real time with a fraction of the complexity of true streaming.
- Streaming is the right choice when an automated system or a person on duty acts within seconds or minutes, as happens with fraud checks, operational alerts and live customer interactions.
- Most enterprises need both, and a sound design uses batch by default and adds streaming for the specific flows whose decisions justify it.

## Start from the decision

For any proposed flow, write a single sentence of the form "When this data changes, this actor does this thing within this time", and then test each part of it.

The actor may be a person or a system. People work on human cycles, so a planner who sets tomorrow's routes at four in the afternoon needs complete and correct data at four and gains nothing from a live feed all day. A system can act in milliseconds, which is why the strongest cases for streaming have software as the consumer, for example when it blocks a card transaction, re-prices an offer or raises an alarm.

The action also has to exist. A live dashboard of orders may be pleasant to watch, but if no one is assigned to respond when a number moves, the extra freshness buys nothing.

The time has to be realistic as well, and three questions sort most requirements.

1. What is the fastest that anyone or anything will respond to this information?
2. What does it cost to act on data that is an hour old compared with data that is a minute old?
3. Is the source itself updated continuously, or does it change only when an upstream batch runs?

The third question catches a common kind of waste, because if the source system posts transactions once a night, no streaming layer downstream can make the data any fresher than that.

## What each approach involves

The comparison below covers engineering consequences, since the tools' feature lists overlap heavily.

|  | Batch | Micro-batch | Streaming |
| --- | --- | --- | --- |
| Typical freshness | Hours to a day | One to fifteen minutes | Seconds or less |
| Unit of work | All data for a period | Small recent increment | Individual events |
| Typical tools | Schedulers such as Apache Airflow or Dagster, SQL transformation with dbt, Apache Spark jobs | Frequent incremental loads, Spark Structured Streaming, warehouse incremental tables | A log such as Apache Kafka, Apache Pulsar or a cloud equivalent, with processors such as Apache Flink or Kafka Streams |
| Handling a failure | Re-run the job | Re-run the increment | Resume from a checkpoint; replay from the log |
| Fixing a logic error | Re-run over history | Re-run over history | Replay retained events, or backfill by a separate batch path |
| Late or out-of-order data | Mostly absorbed by waiting | Occasionally visible | Must be designed for explicitly |
| Testing | Compare outputs for a fixed input | Similar to batch | Must also cover ordering, timing and state |
| Operations | Check after scheduled runs | Monitor frequent runs | Continuous, with lag monitoring and on-call |
| Cost profile | Compute used during runs | More frequent, smaller runs | Always-on infrastructure |

Batch has one great virtue that is easy to undervalue, which is that it is easy to reason about. A job reads a defined input and writes a defined output, and if the output is wrong you fix the job and run it again. Because complete data for a period arrives together, a question such as "what were total sales yesterday" has a settled answer.

Its weaknesses are the wait and the load, because a nightly window that once took two hours can grow to six as volumes rise, until it collides with the working day.

## What streaming really costs

Most of the cost of streaming lies outside the software, much of which is open source or available as a managed service, in a set of problems that only appear when data is processed continuously.

**Time becomes ambiguous**, because an event has both the time it happened and the time it was processed, and the two differ. A mobile device that has been offline for an hour sends its events late, so a streaming computation over "the last five minutes" has to decide how long to wait for stragglers. Engines handle this with watermarks, a moving estimate of how complete the data is up to a point in time, and events arriving after the watermark need an explicit rule that says whether to drop them, correct the earlier result or send them to a side output.

**Order is not guaranteed** across a whole topic, because a partitioned log preserves order only within each partition. If an "order cancelled" event can be processed before "order created", the logic has to cope with that.

**Delivery is at least once**, which means some events are processed again after a failure, and results stay correct only if processing is idempotent or the engine and the sink cooperate transactionally. Exactly-once processing in engines such as Flink and Kafka Streams covers the pipeline's internal state, and it extends to the outside world only where the sink supports it.

**State has to be managed**, since counting, joining and deduplicating over a stream all mean holding state that must be checkpointed, restored after a failure and migrated when the logic changes.

**History needs a second answer.** When a bug is found or a new metric is needed for last year, either the stream has to be replayed or a batch backfill has to be written, and many teams end up maintaining a streaming and a batch version of the same logic and keeping the two consistent.

**Someone has to be on call.** A batch failure at midnight can often wait until morning, whereas a stalled stream is an outage for whatever depends on it. Consumer lag (the distance between the newest event and the last one processed) needs monitoring and an on-call rota, which is ongoing [operations work](https://farside.works/services/cloud-infrastructure/cloud-operations/).

None of this is a reason to avoid streaming, but these costs should be presented alongside the benefit. The same trade-off applies when events are used to connect applications, as covered in [event-driven architecture: what it gives you and what it costs](https://farside.works/insights/event-driven-architecture-tradeoffs/).

## The middle ground

Many requests for real time are satisfied by data that is five minutes old, and that can be delivered without a streaming engine at all. One option is an incremental load that runs every few minutes and picks up rows changed since the last run, and another is change data capture from the source database into the warehouse or lakehouse, with transformations refreshed on a short schedule.

Micro-batch keeps most of the simplicity of batch, because each run is still a job with a defined input and a failed run is retried. The checks described in [build data pipelines that fail loudly](https://farside.works/insights/data-pipelines-that-fail-loudly/) work the same way as they do for batch.

The approach has limits, because below about a minute the scheduling overhead dominates and it starts to strain. Frequent small writes also create many small files or table versions on lake storage that need compaction, which connects to the platform choice discussed in [warehouse, lake or lakehouse](https://farside.works/insights/warehouse-lake-or-lakehouse/).

## A logistics operator's control tower

Consider a logistics operator that moves chilled and ambient goods for retailers, whose leadership asks for a "real-time control tower" giving live visibility of every shipment, built on streaming.

Before choosing a platform, the team lists the decisions the data would feed.

| Decision | Who acts | How fast they can act | Latency needed |
| --- | --- | --- | --- |
| Next-day route planning | Planners, each afternoon | Once a day | Daily batch, complete by mid-afternoon |
| Customer shipment tracking page | Customers checking status | When they look | A few minutes |
| Carrier performance and billing | Finance and procurement | Weekly and monthly | Daily batch |
| Temperature breach on a chilled load | Duty controller, who can call the driver or divert the load | Within minutes | Seconds to a minute |
| Vehicle stopped off-route | Duty controller | Within minutes | About a minute |

Only two of the five need streaming, and both draw on telemetry from vehicles and refrigeration units. The resulting design is modest, with telemetry events flowing through a log to a small stream processor that evaluates two rules, one for a temperature held above a threshold for a set duration and one for a stop outside a planned location, and raises alerts on the duty controller's screen. The processor tolerates late and duplicated readings, since cellular coverage on rural routes is patchy and devices resend data.

Everything else stays in batch or micro-batch, so the same telemetry is written to storage and loaded every few minutes for the tracking page and nightly for planning and billing.

The failure this avoids is specific. If every flow had been built as a stream, the billing figures would have been computed by logic that had to handle late events and replays, which is hard to get exactly right for invoices, in order to deliver a freshness that finance never needed. Success for the streaming part would be measured by an equally specific figure, the time from a temperature breach to a controller acknowledging it, and that is the kind of flow where streaming pays for itself in [logistics and supply chain](https://farside.works/industries/logistics-supply-chain/) operations.

## What to do next

Work through these steps for each data flow you are designing or reconsidering.

1. Write the decision sentence (when this data changes, this actor does this within this time), and default to batch if you cannot name the actor and the action.
2. Check how often the source actually changes, and do not build anything faster than the source.
3. Ask whether a refresh every five to fifteen minutes would satisfy the consumer, and if it would, use micro-batch.
4. If streaming is justified, write down the rules for late, duplicate and out-of-order events before you choose an engine.
5. Decide how history will be reprocessed when the logic changes and who will be on call when the stream stalls.
6. Keep batch as the default path and as the system of record for reporting, and add streams as specific exceptions.

Building both kinds of flow is the work of [data engineering](https://farside.works/services/data-analytics/data-engineering/). When a move to streaming is part of a wider platform change, it should be sequenced within the [data platform modernization](https://farside.works/services/data-analytics/data-platform-modernization/) plan rather than run as a separate project. If an event log is going to serve applications as well as analytics, it becomes shared infrastructure that needs an operating model, which makes it an [enterprise integration](https://farside.works/services/process-automation/enterprise-integration/) decision rather than a pipeline detail.
