The interview problem
An ad campaign must spend throughout a day without exceeding an authorized budget when auction charges arrive late. Design conservative local admission and reconciliation.
Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.
1. Scope and worked approach
Assume a hard spend cap and bounded maximum charge per admitted auction. Allocate spend reservations from an authoritative campaign balance to regions. Each admitted opportunity reserves an upper-bound charge; reconcile actual cost and release unused amounts after a defined outcome. Pace opportunities against a time-varying target curve, but distinguish pacing preference from the hard accounting invariant. Late reports consume existing reservations rather than creating new unbudgeted liability.
2. Trace the design or derivation
Allocate bounded reservation → admit auction → receive charge → settle reservation → reconcile
If charges can exceed the reserved bound, the hard-cap proof fails; either reject that pricing mode or reserve a genuine enforceable maximum. After a lost outcome, retain liability until a provider settlement rule resolves it. A timeout is an operational deadline, not evidence that the auction cost was zero.
3. Calculate the example
A $2,400 daily target has a flat illustrative pace of $100/hour. At hour six, $900 spent is $300 ahead of the $600 target, so admission may slow even though $1,500 remains. If 1,000 unresolved auctions each reserve at most $0.20, $200 must remain encumbered rather than be offered to new work.
4. Failure cases and trade-offs
Treating reported spend as all liability overspends during reporting delay. Returning reservations before their outcomes are final can spend the same budget twice. Conservative reservations reduce utilization; tighter charge bounds improve utilization but must be enforceable.
5. Validation, follow-ups and self-review
Replay delayed/duplicate charges and regional outages. Verify spend plus outstanding liability never exceeds the cap under the stated charge bound. Follow-up: how are unresolved reservations settled after a timeout? Reward separation of pacing, reservation and final accounting.
Sources and related practice
Technical reference: sre.google — Admission and overload reasoning; budget reservations and aging rules are original extensions.
Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.
Continue with Design token usage accounting and reconciliation; Allocate tenant quotas across regions.
Continue your preparation
Choose a connected learning path or browse more System design questions. Read our editorial method and attribution policy.