Why Streaming Costs More

A batch job rents machines for the minutes it runs. A streaming job rents them for every minute of the day, including the hours when almost nothing arrives. That difference drives most of the cost gap.

Line itemNightly batchStreamingRatio
Compute, 4M rows/day4 machines x 1 h = 4 machine-hours3 machines x 24 h = 72 machine-hours18x
Peak sizingSized for the whole day's rows in 1 hSized for the busiest second, idle the restn/a
Writes to curated layer1 commit per day1 commit per second = 86,40086,400x
Always-on queueNone, reads yesterday's tableQueue cluster running 24 hnew line item
PeopleFailures found next morningPager at 03:00 for a stalled jobon-call rota

The compute line surprises people in the other direction: streaming uses fewer machines at any moment than the batch job at its peak, because the work spreads across the day instead of piling into 1 hour. It still costs 18 times the machine-hours because those 3 machines never stop. Reserved pricing can shave the ratio, but the shape stays: streaming pays for idle time, and batch pays only while it runs.

3 places the premium hides

Idle capacity, commit overhead and on-call

Pricing the delay

The premium is justified when a decision made from fresh data is worth more than the premium. Put a price on the delay. A fraud check that declines a stolen card at checkout saves the full order value; the same check run tomorrow morning saves nothing, because the goods shipped. A weekly revenue report that is 1 hour stale costs nothing, because nobody reads it until Monday.

ConsumerCost of 1 hour of stalenessFreshness that removes itPattern that earns its premium
Card fraud decisionOrder value per fraudulent orderSecondsStreaming
Warehouse stock on product pageRefund per oversold unitMinutesMicro-batch
Marketing spend dashboardA mistimed budget shift, once a day at mostHoursHourly batch
Monthly finance closeNothingDaysNightly batch

Work the arithmetic for the stock example. The store oversells roughly 2 units per hour of staleness, and each oversell costs $15 in refunds and support time. Hourly batch leaves 1 hour of staleness: 48 oversells a day, $720 a day in cost. A 1 minute micro-batch leaves 1 minute of staleness: under 1 oversell a day, around $12. If moving from hourly batch to micro-batch adds $200 a day in compute, it pays back more than 3 times over. Per-event streaming at $2,000 a day would save the last fraction of an oversell and lose money.

Latency is worth the premium when
  • The consumer is a machine, or a person acting within minutes
  • Each minute of staleness has a cost you can write down
  • Input arrives steadily, so machines are rarely idle
Latency is wasted spend when
  • The consumer reads on a schedule: a daily report, a weekly review
  • Staleness costs nothing until a threshold measured in hours
  • Input arrives in daily dumps, so the stream waits on an upstream batch anyway

A team proposes replacing a nightly batch that feeds a weekly executive revenue deck with a streaming pipeline. The batch costs $40 a day; the stream estimate is $600 a day. The deck is opened on Monday mornings only. Which judgement is right?

About this lesson

This section is part of the Batch vs Streaming: Intermediate lesson on DataDriven, the home of data engineering. Lessons cover SQL, Python, Spark, data modeling and pipeline architecture, and each section pairs its explanation with worked examples and practice you run as you go.