skip to content

A regional feed produces only between 22:00 and 06:00 and shares one job with always-on feeds. How would you design time advancement for both?

level: principalimportance: nice to knowfreq 30%

answer

  1. placement, not a knob
  2. one job means one shared time
  3. no finite wait moves a silent input
  4. make the producer say something
  5. state the promise for the quiet window

basics

~20 s

Treat it as a placement decision, not a setting: isolate the quiet feed in its own job, have its producer emit periodic filler records, force it forward on a timeout, or accept the stall — each bills a different owner.

solid answer

~40 s

A job's **completeness claim** — the timestamp it carries meaning nothing older is still expected, plainly a *watermark* — is the minimum across its parallel inputs, so a feed silent sixteen hours a day sets every other feed's latency for sixteen hours a day. Four honest designs. **Isolate**: run it as its own job with its own time domain and join downstream. **Keep it talking**: have the producer emit a periodic filler record carrying its current moment — not a liveness ping about whether a machine is up — so nothing is excluded. **Force it forward** on a timeout, accepting that its first records each night are late by construction. **Accept the stall** if consumers need one joint number and can wait. Choose by who can absorb the cost, and publish which you chose.

go deeper

for a junior

Recall the core constraint: inputs sharing a job share one notion of time, and one that is quiet all day holds the others back. The fix is a design choice, not a number you type.

for a middle

Be able to lay out the options and their mechanisms: isolate the feed, have the producer keep its time moving, exclude it on a timeout, or accept the stall — and explain why simply waiting longer cannot help a silent input.

for a senior

Choose and defend one against the operational realities: who owns the producer, what a second job costs to run, and what the morning's late records do to already-published numbers.

for a principal

Own the promise across teams: what a published overnight figure means while a feed is quiet, which consumers can absorb a corrected answer, and whether this feed should be an endless input at all.

## Why this is a design question and not a tuning question The mechanism is settled: a job asserts a **completeness claim** — a timestamp carried with the records meaning *nothing older than this is still expected to arrive* — and it may only assert the minimum across its parallel inputs, so an input that delivers nothing pins everyone. What is *not* settled is who should be paying for that. A feed that is productive eight hours a day and silent sixteen is not a fault to be tuned away; it is a property of the business, and the decision is where in the architecture that property is allowed to land. The four placements, and what each one actually costs: | design | who pays | what it costs them | when it is right | |---|---|---|---| | isolate the quiet feed in its own job | the platform | a second job to run, deploy and watch, plus a downstream join | the feeds are genuinely independent and the joint number is assembled later | | producer emits periodic filler records | the producing team | a change in a system you may not own, and a contract that it keeps emitting | you control the producer, or can ask for it | | exclude on an idle timeout | the quiet feed's consumers | its records are late by construction every morning | its completeness matters less than everyone else's timeliness | | accept the stall | every consumer of the job | sixteen hours of held results each day | one joint number is required and lateness is unacceptable | ## The isolation argument The strongest version of this answer is that mixing a scheduled, bursty, low-traffic input with always-on inputs **in one time domain** is the original mistake. Time is a shared resource in a job: every input contributes to one asserted moment, and the contribution of a silent input is *stop*. Splitting the job gives each population the latency profile it deserves and removes the coupling permanently — no timeout to size, no producer change to negotiate, no lateness manufactured. Its price is real and should be said out loud: - two jobs to operate, deploy and watch instead of one; - two sets of retained state, sized and paid for separately; - a downstream join that must reconcile two time domains advancing at different speeds; - one more place where a schema or a contract change has to be applied twice. ## The filler-record argument The most complete fix, where it is available, is to stop the silence being silence. If the producer emits a small record at a fixed cadence carrying its current moment, the input has evidence to advance on even with nothing to report, so the minimum moves and nothing is ever excluded or made late. Three cautions: - It requires a change in a system the data team frequently does not own, and it becomes a standing contract — if the filler stops, the stall returns, and now silently. - The filler must carry a *moment*, not merely exist. A record with no usable timestamp advances nothing. - Downstream logic has to ignore it in the aggregates, which means everything that reads the feed has to know it exists. ## Why widening the wait is not one of the options A candidate often reaches for "just wait longer". The wait a job holds behind the newest moment it has seen is measured against moments that were actually supplied. A silent input supplies none, so no finite wait advances it — the claim would sit exactly where it is behind a wait of any length. Widening the wait costs every group on every input latency and buys nothing here. Say this explicitly; it is the cleanest demonstration that you understand the mechanism rather than the knob. ## What you owe the consumers Whichever design is chosen, the organisational half is the promise, and it has three parts: 1. **State what a published number means during the quiet window.** If the quiet feed is excluded, the overnight regional figure is provisional until that feed reports; consumers should be told that rather than discovering it. 2. **Say what happens to the records the design makes late** — discarded, sent to a separate channel for reconciliation, or folded into a corrected answer that replaces the published one. Any of the three can be right, and which the downstream sinks can absorb decides it. 3. **Make the silence visible.** A quiet input that is quiet because it failed looks identical to one that is quiet because it is night. Whatever design you pick, something must distinguish "expected silence" from "broken" — otherwise the design that protects the busy feeds also hides the outage of the quiet one. ## What varies between engines Not every runtime gives you all four options. Some expose a direct facility for excluding an idle input; on others the only levers are the producer and the job boundary. A runtime that runs continuous work as a succession of small finite jobs re-evaluates time at those boundaries, which sets the finest granularity any of this can have. And a pipeline that only ever makes a single pass over a finished bounded input has no running claim to stall — which is itself an argument worth making: if the quiet feed is genuinely nightly, the honest design may be to process it as a bounded input each morning rather than to model it as an endless one at all.

  • What is the argument for not modelling the nightly feed as an endless input at all?
    If the feed genuinely closes each morning, a pass over a finished bounded input has an end, so its time can be advanced to the end and everything closes — no claim to stall, no timeout to size, no records made late. The cost is a separate pipeline and a join against the continuous results.
  • How do you keep the chosen design from hiding a real outage of the quiet feed?
    Expected silence and broken silence look identical from inside the job, so something outside it must distinguish them: an expectation of when that feed should next report, checked independently, plus a count of records that arrived behind the claim. Without both, the design that protects the busy feeds also conceals the quiet one failing.
  • If you isolate the feed into its own job, what becomes harder?
    The join. Two jobs now hold two time domains advancing at different rates, so the combined result is only as complete as the slower of them, and the reconciliation has to decide whether it publishes early and corrects, or waits. You have moved the problem downstream rather than removed it — but to a place where it can be handled per consumer.

saying these in an interview costs you the question

  • Proposes a much longer wait to cover an input that sends nothing
  • Treats it purely as choosing a timeout value
  • Never considers separating the quiet feed from the busy ones
  • Ignores that excluding the feed makes its records late every morning
  • Leaves consumers unable to tell provisional numbers from final ones
  • Assumes the producer can always be changed to emit filler records