The interview problem
Urgent jobs continually arrive and normal jobs never run. Design a priority policy that preserves urgency while giving ordinary work a defensible service guarantee.
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 bounded job quanta and explicit authenticated priority classes. Combine class reservations with aging of waiting jobs, rather than allowing arbitrary callers to mark everything urgent. Define maximum promotion and how running work is preempted or allowed to finish. Persist enqueue time and original class so retries cannot reset age or gain new priority. Bound queue size separately from scheduling fairness.
2. Trace the design or derivation
Admit bounded work → reserve class capacity → age waiting jobs → dispatch quantum → account service
Age based on original logical enqueue time while limiting the total work admitted per customer. Otherwise a tenant can flood old jobs that eventually dominate every class. Measure fairness in resource time, not job count, when jobs differ in cost; use runtime estimates and correction after completion.
3. Calculate the example
A pool with 100 worker-seconds/s reserves 20 for normal work. If normal jobs cost two worker-seconds each, their ideal reserved throughput is ten jobs/s when backlogged. An arrival rate of 15 normal jobs/s still grows the queue by five jobs/s; starvation protection does not guarantee finite delay under overload.
4. Failure cases and trade-offs
Unbounded non-preemptible tasks undermine short waiting guarantees. Clock errors can corrupt age; use an appropriate server time basis. Strict reservations can leave capacity idle, while borrowing needs a way to reclaim it promptly. Aging every job into the top class eventually removes meaningful urgency.
5. Validation, follow-ups and self-review
Load urgent work continuously and measure normal service share, queue growth and promotion behavior. Follow-up: what deadline promise is possible above admitted capacity? Reward admission limits, bounded execution and a precise rather than absolute fairness claim.
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 Schedule mixed-cost tenant jobs fairly; 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.