[ Engineering ]

Streaming data in real time without the night calls

·

2 min read

·

InfraCore Engineering

var(--variable-Xl_A26EtY)

On this page

01 Make silence a signal 02 Keep the last good state 03 Make the way back cheap

How to design pipelines that report their own failures, so the first sign of trouble is a message and not an angry customer.

Batch jobs fail quietly. A nightly import stops halfway, the dashboard keeps showing yesterday’s numbers, and the first person to notice is whoever trusts the wrong figure in a meeting. Streaming changes the failure mode: when data moves continuously, a stall is visible within seconds.

Make silence a signal

The most useful alert in a streaming system is not an error. It is the absence of events. If a source that normally emits a thousand records a minute emits none for ninety seconds, something is wrong, even though nothing has thrown an exception.

  • Track the expected rate per source, not just a global total

  • Alert on the gap between event time and processing time

  • Treat a sudden drop to zero as louder than a gradual decline

Keep the last good state

When a downstream step fails, the pipeline should hold the last good output and say so, instead of overwriting it with half a result. Consumers then see stale but correct data, labelled as stale, which is a much easier conversation than wrong data labelled as fresh.

source.watch({ expectedRate: "1000/min", silenceAfter: "90s" })
.onSilence(alert.page("data-platform"))
.hold("last-good")

Make the way back cheap

Every deployment of a stream processor should be reversible by replaying from a stored offset. If a bad release can be undone by moving a pointer, nobody needs to be woken at three in the morning to hand-edit a table.

A pipeline that cannot tell you it is broken is not finished.

None of this needs a new philosophy. It needs the pipeline to report on itself, and the alert to reach a person while the problem is still small.

Create a free website with Framer, the website builder loved by startups, designers and agencies.