Skip to content
About
Main content

What streaming forbids, and what the escapes cost

What can a streaming design never verify?

What this mechanism forbids

  • Unbounded retention with bounded state. Every needs a . The operators that appear not to have one have an implicit one, which will be enforced by an out-of-memory crash.
  • Exactly-once effects at latency below the checkpoint interval, unless the is .
  • Global ordering with parallelism. Order exists per key or not at all.
  • Free rescaling of anything stateful.
  • Splitting a single hot key.
  • Final results before the watermark permits, or revisable results without imposing handling on every consumer downstream.
  • Throughput above the slowest operator, with no queueing rescue because are bounded by design.
  • Code changes without a state migration.

The escapes and what each costs

ForbiddenEscapePrice
Unbounded join stateInterval bound, TTLSilent wrong answers when real skew exceeds the bound
Sliding-window S/s blowup decompositionAggregate must be ; exact distinct and median need
Hot key caps Salt + aggregates only; extra and stage
Full snapshots too largeReference counting, file , periodic consolidation, longer restore chains
Alignment stalls under loadUnaligned Larger checkpoints, more write bandwidth
Lookup RTT caps throughput + cacheNon-determinism, ordering choice, cache staleness
Non-reproducible on a dimension changelogMulti-version state, second , idle-source stalls
sink fragilityIdempotent writes on deterministic keysDeterministic key derivation, upsert-capable sink
Rescale downtimeRTT per access, cache coherence, unsettled for tight loops
Code change breaks stateParallel run + cutoverDouble compute, source , idempotent sink
State too large for memoryEmbedded LSMWrite , competing with processing

Look at the right-hand column: many entries are silence. The characteristic failure of streaming is not a crash. It is a correct-looking number that is slightly wrong, produced by a bound that was set for resource reasons and then quietly became a correctness boundary.


What the design assumes it cannot verify

Three things. Carry them forward as a checklist for any streaming design:

  1. The source's retention exceeds the worst-case downtime plus catch-up. (Otherwise the log has deleted the data you need to .)
  2. The job's computation is deterministic under replay.
  3. Real-world event skew stays inside the configured retention bounds.

All three fail silently. In all three cases, the cost lands on a downstream consumer who has no way to distinguish a correct answer from the one they got.