The five-minute exception feed
Run a 35-minute mock interview.
The interview prompt
Run a 35-minute mock interview. Design a five-minute exception feed for missing carrier handoffs alongside a nightly finance close. The interviewer will introduce partial fulfillment, a retry, and a scanner that was offline. Save five minutes to challenge your own design.
A whiteboard answer with numbers and failure paths
Spend the first five minutes defining the unit of action. A promise covers a quantity on an order line, an origin, a deadline, and a cancellation policy. Mark which clock controls “overdue” and whether the five-minute target begins at the deadline or at receipt of delayed evidence. Use the next ten minutes to draw accepted promises, dispatch occurrences, cancellations, and the current outstanding quantity.
Suppose 1.2 million promises fall due in a ten-hour day. The average is about 33 per second. At an assumed ten-times peak, plan a test around 333 per second, plus retries and corrections. A once-a-minute indexed scan of newly due promises and unresolved items may be enough. Compare its measured peak scan and update times with a timer-based stream. A query that rescans every historical order each minute has a very different workload.
In the next ten minutes, trace a six-unit promise with four confirmed handoffs. Alert on the two outstanding units after the deadline using an identifiable exception. A retry updates the same case. A later genuine dispatch clears or reduces it. If a cancellation arrives out of order, recompute the obligation under the source ordering rules. Keep the finance release on its own governed cutoff.
For the last ten minutes, including self-review, describe a failure and the evidence the operator sees. Measure unconfirmed promises, sources past their freshness targets, time to alert, false alerts later cleared, and the cost of processing a day. Give support wording that distinguishes “handoff unconfirmed” from “parcel definitely still in the warehouse.”
The model behind the answer
Interview prompt. Six engineers run a nightly finance report. The warehouse supervisor now wants to see overdue handoffs within five minutes of the promised time, including parcels that have produced no scan. Sketch the smallest change you can defend.
I’d ask when a promise becomes actionable, whether cancellations withdraw it, and how quickly the scanner can deliver evidence. Keep the daily finance path if it meets its deadline. Maintain an operational view keyed by the promised handoff. When the promise comes due, check for an eligible dispatch or cancellation and create one identifiable exception. An absence cannot trigger a scanner message. A timer or scheduled query must revisit the promise.
If the scanner itself can be ten minutes late, the system cannot guarantee knowledge of physical reality within five. It can flag “dispatch unconfirmed” within five minutes, then clear it when evidence arrives. Measure detection delay, late confirmations, false alerts, and cost per monitored promise. Compare a frequent indexed query with a continuously updated stream under expected load.
Now return to the six books. If four have left, the supervisor needs an exception for the two outstanding copies. If a retry creates a second alert for the same outstanding promise, the system has lost the identity you defined in the first essay. Now you can point to one row, the person who acts on it, and a test that would prove your design wrong. Revisit the opening case
Run an AI-driven release review in eight minutes
Use the last eight minutes of the 35-minute interview. Give the agent a narrow ticket for a shadow exception feed and a fake notification sink. The reviewer keeps a six-unit promise, four handed off, a duplicate scan and a late two-unit handoff. Ask the candidate to predict the complete sequence before examining an implementation.
Reviewer decision. At the deadline one case shows two unconfirmed units. A retry leaves that case unchanged. Late evidence clears it and leaves the archived finance file intact. Compare old and shadow outputs by promise. Hold promotion on a duplicate alert or changed finance file. To recover, switch readers back, reconcile any delivered alerts by ID, then replay retained events. Turn the first unexplained discrepancy into the next regression case.
Further reading. Designing Data-Intensive Applications, 2nd ed., on late evidence and corrections to previously emitted results.
One more question
Score the answer on five observable decisions. What would justify full credit?
Check your reasoning
Award one point each for an explicit grain and deadline, correct partial quantities, a timer or scheduled absence check, idempotent replay plus late correction, and a measured workload with an accountable owner. A design that omits the absence check cannot observe a promise that never produced a scan, regardless of its database choice.
Previous · Who owns the definition of a shipment · Next · Series map · Complete series map