skip to content

Choosing a Processing Engine

Whether a workload has outgrown one machine, and which kind of system should then run it: a cluster you hand a program to, a service you hand a query, or a scheduler that hands out jobs.

on this pageshow

explore

questions

24

What makes an input bounded — yesterday's finished files against a feed that never stops — and what does that ending buy?

level: juniorimportance: must knowfreq 72%

answer

  1. does the reading ever finish?
  2. an end, not a size
  3. totals need a last record
  4. final answer against a running one

basics

~20 s

A bounded input has a last record the reader can reach; an unbounded one does not. Reaching that last record is what lets a job produce one total, one global sort or one rank, call it final, and stop.

solid answer

~50 s

Boundedness is a property of the data, not of the machinery reading it. A bounded input is one whose membership is already settled, so a reader that keeps going arrives at a last record and observes that there is nothing more; an unbounded input keeps being produced, so there is no last record and no moment at which everything has been seen. Everything that needs *all* the records depends on that ending: a count or a sum over the whole input, a global sort, a rank or a top-N, an exact maximum, and the right to label a number final. An ending also buys recomputation — as long as the input still exists unchanged, running the same logic over it again yields the same answer. Once the ending is gone you have to impose a boundary of your own and accept answers that are true as of the records seen rather than true once and for all.

go deeper

for a junior

Be able to say it in one line: a bounded input has a last record, an unbounded one does not, and totals, sorts and the word final all depend on reaching that last record.

for a middle

Explain which computations break and why — anything whose answer is uncertain until every record is seen — and name the two replacements: a boundary you impose, or a value revised as more arrives.

for a senior

Show that you settle boundedness before anything else in a design, and that you can price what the ending was worth: a number that can be published as final and a rerun that reproduces it.

for a principal

Frame it as a platform question: which inputs genuinely have no end, and what the house contract is for publishing from those, so each team does not invent its own meaning for a changing number.

## What "bounded" actually means An input is **bounded** when the set of records the computation is defined over is already settled: every record that will ever belong to it exists, so a reader that keeps going reaches a last one and observes that there is nothing further. An input is **unbounded** when no last record exists — something is still producing, and any point at which the reading stops is a point the reader chose, not one the data announced. Four things this distinction is *not*: - **Not a size statement.** A twelve-row file nobody will ever append to is bounded. One record an hour, forever, is unbounded. Size decides whether you need more than one machine; boundedness decides what you are allowed to compute. - **Not a speed statement.** A finite input can trickle in over hours; an endless one can arrive in a torrent. - **Not a statement about transport.** Files that keep appearing in a watched location are unbounded. A fixed slice of a continuous feed, pinned between a start and an end boundary you chose, is bounded. - **Not a statement about how the job runs.** Whether the runtime handles each record the moment it arrives, or collects an interval's arrivals and executes an ordinary finite job over just that slice, is an independent choice and a separate subject. ## What the ending buys Everything that needs to have seen *all* the records is available only when there is a last record to reach. | What you want | Why it needs the end | What is left without it | |---|---|---| | A count or sum over the whole input | it is only the total once nothing more can be added | a running value, or a total within a boundary you impose | | A global sort | the first output position is uncertain until the smallest remaining record is known | an ordering within an imposed boundary only | | A rank or top-N | any unseen record could displace an entry | a running list, correct as of the records seen | | An exact maximum or exact distinct count | one more record can move either | a value that may still move | | The word "final" on a published number | finality is the claim that no later record can change it | "as of" a stated point | | A rerun that reproduces the answer | the input still exists and is unchanged, so the same logic gives the same result | re-reading later covers a longer input | The three things an ending buys, in the order they usually decide a design: 1. **A single final answer.** The job computes, emits once, and exits. Downstream readers get one value with no versioning problem. 2. **A total ordering.** Sorting and ranking are only meaningful over a set whose membership is closed. 3. **Reproducibility by recomputation.** A logic error found later can be answered by running the corrected program over the same input from the top, as long as that input is still there unchanged. ## What you must invent once the ending is gone - **A boundary of your own.** Nothing in an endless input proposes one, so the computation has to impose it — the shapes such a boundary takes, and when the grouping emits, are a separate subject. - **An output that is revised.** Instead of one value produced once, you get a sequence of values, each correct as of the records already seen. - **A rule that keeps memory finite.** A bounded input lets you retain everything until the end because the end arrives; an endless one does not, so something must expire or fold records away. - **A way to say what a number covers.** Without an ending, a published figure needs an as-of marker to mean anything. ## Where candidates go wrong - Treating **bounded** as a synonym for *small*. A multi-terabyte archive is bounded; it simply needs a cluster execution engine — a system you hand a whole program to, which splits the work across many machines, runs the pieces and puts the results back together. - Calling an input endless because of how it travels. Transport is not membership. - Promising a stakeholder a total over an input that never ends, then discovering at review time that the number changes every day and nobody agreed what it means. - Believing an unbounded input yields nothing useful. It yields plenty; what it does not yield is a number that cannot change. The practical habit is to ask boundedness first, before size, before choosing any system: it is the property that decides whether the requirement as written is even satisfiable.

  • A producer is still writing files into a location. Is that input bounded once it stops?
    It becomes bounded only when something tells the reader the writing is over. The records themselves carry no such signal, so producers publish an explicit completion marker, or the reader is given a fixed list of files. Without one, a job that starts early silently computes a total over a partial set and reports it as complete.
  • Does a bounded input guarantee that a rerun produces the same answer?
    No. It removes one obstacle — the input still exists and its membership is closed — but the logic must also be deterministic and the input unchanged. Ordering-sensitive steps, sampling and anything reading wall-clock time can still differ between runs; that repeatability question belongs to the job's own dataflow, not to boundedness.
  • Is boundedness a property of the source or of the computation?
    Of the record set the computation is defined over, which is the two together. The same source supports both readings: everything already written is bounded, while the same location read continuously for new arrivals is not. Saying which one you meant is the whole of the answer in a design review.

A shop that closes at six can announce the longest wait of the day once the doors shut; a twenty-four-hour shop can only ever announce the longest wait so far, and tomorrow's figure may overwrite it.

saying these in an interview costs you the question

  • Says bounded just means small enough for one machine
  • Calls an input unbounded because it arrives over a network
  • Claims nothing useful can be computed over an endless input
  • Thinks the runtime, not the data, decides whether there is an end
  • Believes a total over an endless input only needs more memory
open as a page

A program is handed to a cluster and reads no input for forty seconds. What is the cluster doing?

level: juniorimportance: must knowfreq 62%

basics

~20 s

Before the first read, a cluster must be granted capacity, launch a worker process on each machine, copy the program and its libraries to each, build a plan and list the input. None of that touches data.

open as a page

A workflow scheduler and a cluster execution engine both draw a graph of steps with no cycles - what does an edge mean in each?

level: juniorimportance: must knowfreq 68%

basics

~20 s

In a workflow scheduler's graph an edge means only 'start after the previous step reported success'; nothing travels along it. Inside one program handed to a cluster execution engine, an edge carries the records themselves from one step to the next.

open as a page

When you hand a program to a cluster engine versus a statement to a query service, who owns the storage, the plan and the capacity?

level: juniorimportance: must knowfreq 70%

basics

~20 s

A cluster execution engine runs your program on machines that are part of your deployment, over storage you point it at, along a plan your code shapes. A managed query service owns all three and shows you none of them.

open as a page

A pipeline over a never-ending input emits results only every thirty seconds: which execution shape is it on, and what fixes that floor?

level: juniorimportance: must knowfreq 72%

basics

~20 s

A fixed reporting cadence usually means the runtime executes repeated small finite runs: it collects whatever arrived in an interval, runs an ordinary finite job over that slice, and repeats. The floor is the interval plus that run.

open as a page

A 40 GB event file must be totalled per customer on a 16 GB laptop — does that need a cluster?

level: juniorimportance: must knowfreq 74%

basics

~20 s

Usually no. Bytes on disk are not the test; the working set is. Per-customer totals hold one running number per customer, so the records can be read in passes and discarded, and only the totals must fit in memory.

open as a page

Over yesterday's finished orders a global top-10 by spend is one sort. Over an input with no end, what happens to that requirement?

level: middleimportance: must knowfreq 62%

basics

~20 s

It has to be redefined. With no last record, no ranking is ever settled, so you either rank within a boundary the job imposes, or publish a running top-10 that is correct only as of the records already seen.

open as a page

A grouping that ran inside one process is now run across twenty machines. What work does only the distributed run do?

level: middleimportance: must knowfreq 58%

basics

~20 s

Only the distributed run encodes each value into bytes and decodes it again at every process boundary, adds framing and bookkeeping per unit of work, and ships the program and the values its functions captured to every machine.

open as a page

A team argues their data is too big for a query service and wants a cluster instead — which properties actually decide?

level: middleimportance: must knowfreq 64%

basics

~20 s

Volume is the weakest predictor. What decides is expressibility: whether the work needs arbitrary code and libraries running next to the data, whether the service can read the inputs at all, and where the data already lives.

open as a page

A nightly report program on one machine now takes seven hours; which checks come before moving it to a cluster?

level: middleimportance: must knowfreq 66%

basics

~20 s

Find where the seven hours go before adding machines. A quadratic scan, repeated re-reads, and fields nobody uses stay expensive after distribution — and a run pinned to one core on a sixteen-core machine has headroom where it is.

open as a page

A rerun over stored records and a continuous job disagree on the same hour's total: what must the reconciliation step decide?

level: seniorimportance: must knowfreq 62%

basics

~20 s

Reconciliation decides which of the two answers a reader sees for each period, at what moment one supersedes the other, whether a published number is allowed to change, and how a disagreement is detected rather than reported by a stakeholder.

open as a page

One input arrives as files on shared storage, another over a continuous feed. Why does the transport not decide whether the input is bounded?

level: middleimportance: should knowfreq 55%

basics

~20 s

Boundedness is whether the record set has a last member, not how the records travel. A watched location that keeps filling is unbounded, and a slice of a never-ending feed pinned between two chosen boundaries is bounded.

open as a page

Two steps a workflow scheduler starts in order pass a 400 GB intermediate through object storage - what does that boundary cost?

level: middleimportance: should knowfreq 58%

basics

~20 s

A full write and a full read of 400 GB, plus a second program's start-up and a path someone must name, encode and eventually delete. An edge between two steps a scheduler starts carries nothing, so whatever crosses it has to be materialised.

open as a page

A workflow scheduler is given one step per input file and there are 40,000 files - what breaks, and where does that fan-out belong?

level: middleimportance: should knowfreq 52%

basics

~20 s

Fixed per-step costs dominate: 40,000 program launches and 40,000 rows of scheduler bookkeeping for a few seconds of real work each, throttled by whatever concurrency limit the scheduler enforces. Fan-out over data belongs inside one submission, as parallelism.

open as a page

When one worker process dies mid-flight, what work is redone under repeated small finite runs versus a runtime handling each record on arrival?

level: middleimportance: should knowfreq 58%

basics

~20 s

The execution shape fixes the unit of redo. Under repeated small finite runs, at most one interval's slice is re-executed. Under a runtime handling each record on arrival, the redo reaches back to the position the job last saved.

open as a page

A figure published from a never-ending input changed after a stakeholder read it. What contract should that output have carried, and what does it demand of the reader?

level: seniorimportance: should knowfreq 48%

basics

~20 s

Say whether the number is final or provisional. Over an input with no end a value is true only as of the records seen, so either freeze a bounded slice and publish once, or publish revisions with an as-of marker.

open as a page

One process finishes or dies whole, but a cluster run can end with some pieces done and others lost. What does that possibility cost a team?

level: seniorimportance: should knowfreq 55%

basics

~20 s

Partial failure: some work is durable and some died with its machine. The team now owns a write path and a rerun that stay correct when the same records arrive twice, monitoring that can tell degraded from failed, and a definition of done that is not an exit code.

open as a page

A nightly cluster program pulls two tables out of a query service, joins and aggregates them and writes a summary back — what do you check before replacing it with three declarative statements?

level: seniorimportance: should knowfreq 52%

basics

~20 s

Check what the program's own code carries beyond the join and the aggregate — null rules, deduplication, an outside lookup, precision handling — and whether anything needs a library. If nothing does, the extraction and return trip are pure cost.

open as a page

Which computations over a 2 TB input refuse to run in bounded memory on one machine, and what still lets that machine finish them?

level: seniorimportance: should knowfreq 52%

basics

~20 s

Computations whose retained state grows with the input — a global sort, an exact distinct count at high cardinality, an exact median — resist bounded memory. One machine still finishes them by writing sorted chunks to local disk and merging them back.

open as a page

Your team keeps a pool of machines up for its jobs. Beyond the hourly bill, what does that pool cost, and what stays when you shrink it?

level: principalimportance: should knowfreq 45%

basics

~20 s

Capacity billed while idle, plus a standing surface: version consistency across every worker, coordinated upgrades, an access and credential model, on-call for infrastructure nobody on the team wrote, and the expertise to run it. That surface is per cluster, so halving the machines does not halve it.

open as a page

Your platform's default is one submission per pipeline - which boundaries should become scheduler edges instead, and what does each one cost?

level: principalimportance: should knowfreq 42%

basics

~20 s

Promote a boundary only when something other than the next step needs it: a different program or runtime, an intermediate real consumers read, an external wait, or two halves wanting very different capacity. Each promotion costs a materialised named artefact, a second start-up, and a second picture to read.

open as a page

For a platform where most transformations could run either place, what do you set as the default and what does the escape hatch to a cluster cost?

level: principalimportance: should knowfreq 40%

basics

~20 s

Set the boundary as a written rule, not per pipeline. Default to whichever side already holds the data and the people, and make the escape hatch a capability test rather than a preference. Owning both sides costs a second skill set, a second deploy path and logic that drifts.

open as a page

As a platform default for new pipelines, would you require one implementation serving both modes or accept two, and how do you decide?

level: principalimportance: should knowfreq 45%

basics

~20 s

Default to one implementation serving both the live run and the recomputation, and make a second implementation a reviewed, time-boxed exception with a named owner. Drift and reconciliation are paid every month; a single path pays mostly up front.

open as a page

A 200 GB daily input that one large machine still handles has grown sixfold in eighteen months; how do you decide when to commit to a cluster, and what does deciding early or late cost?

level: principalimportance: should knowfreq 46%

basics

~20 s

Decide on growth rate, not today's size: track projected months until the working set or the run time reaches what the largest available machine can do. Committing early pays a per-run floor cost; committing late migrates under a failing deadline.

open as a page