Engineering note · Decision guide
Does your pipeline need real-time processing?
Start with the decision that needs fresh data. Then choose the latency, recovery behavior, and operating model.
Who needs the data, and when?
Start with the person or system that uses the result. What happens if it arrives late? A requirement such as “real-time” leaves that unanswered. Specify when the data must be usable, how you will measure that interval, and what a delay costs the business.
For example, a daily finance report and a stock-availability check can have different freshness needs.
Write a freshness target
Describe the interval from a source change to a usable result. Include ingestion, transformation, and delivery. A fast consumer does not make the whole pipeline fresh if the source export runs once a day.
Agree how to observe this interval. Also decide how the team should respond when the target is missed.
Check whether batch already meets the need
A scheduled pipeline can be appropriate when its delivery window supports the business decision. Review its actual runtime, dependencies, retries, and peak input volume before replacing it.
If the requirement is tighter than the current schedule, investigate the reason. Removing repeated work or shortening an import cycle may be enough. Use that requirement to judge whether continuous processing is needed.
Design failure behavior before choosing tools
For a streaming design, discuss ordering, duplicates, late data, state, replay, and downstream availability. For batch, discuss partial runs, retries, backfills, and dependent jobs.
For either mode, explain how a failure affects the business workflow, how the team restores correct data, and how it verifies the result.
Consider a mixed design
Different stages can use different modes. A platform might ingest changes continuously and compute some results on a schedule. That design should be assessed against the freshness target for each output.
Avoid applying the strictest freshness requirement to every dataset without a business reason.
Make the decision explicit
Before approving a change, record:
- The business action and the person or system that needs the result.
- The freshness target and how it will be measured.
- Expected volume and peak conditions.
- Recovery and data-quality requirements.
- Operating responsibilities and the cost trade-offs.
- A small test that can challenge the main assumptions.
You may decide to improve the batch pipeline, introduce continuous processing for one flow, or revisit the requirement. Record why you chose that path and how you will check whether it meets the need.