Comparison
BackpressurevsStream processing
Backpressure
the consumer tells the producer to slow down rather than silently buffering work it cannot keep up with.
A mechanism by which a saturated component signals upstream to reduce its rate. The alternative is an unbounded buffer, which converts a throughput problem into a memory exhaustion problem and hides it until the process dies. Bounded queues that block or reject are the simplest form; explicit credit-based flow control is the sophisticated one.
Full entry →Stream processing
records are handled one at a time as they land, and the job has been running without finishing for four months.
Processing records continuously as they arrive, over an input that never ends. The job is a long-lived process holding state rather than something that starts and stops, which is what makes every hard streaming question — restarts, ordering, exactly-once, late data — a question about that state. Choose it when the value of an answer actually decays in minutes; choose batch when someone just said 'real time' in a meeting and meant 'not tomorrow'.
Full entry →