InterviewLegend

Distributed Job Scheduler

Signature problem
Alex Chen44 min readUpdated 970 real interview reports

This is the distributed design Oracle reaches for most often with a senior candidate, and it fits them for a reason. A scheduler is durable state in a database, kept correct while many machines touch it at once, run at a scale you can reason about. That is Oracle's home turf. Nothing here runs at internet scale, and nothing here needs infrastructure you invent from scratch. The whole problem is a table of jobs and the discipline to pick the due ones up exactly once. That is the entire game. Almost every interesting decision comes back to one question. How do you find the jobs whose time has come, hand each to exactly one worker, and recover the ones whose worker died? And how do you do it without the database melting under the load?

Watch how the interviewer grades, because it colors what you put on the board first. They want the data model and the API contract up front, the jobs table and the two or three endpoints, before any boxes. A scheduler is a state machine over rows, so the schema is where the thinking shows, and a vague "we have a jobs service" answer stalls the round. Lead with the table. Once the schema is down they push on trade-offs: the claim under concurrency, what happens when a worker dies mid-job, how the scan holds up at millions of rows. Expect them to drop from "draw the architecture" to "now write the query that claims a due job" in the same breath. That collapse of the high-level into the low-level inside a single question is how this loop tends to run.

The Oracle angle
Oracle is a database company, and this problem is where that shows. The strongest answer treats the durable store as the queue. It uses the database's own row-locking to hand each job to one worker instead of bolting on a separate timer service. The interviewer is listening for SELECT ... FOR UPDATE SKIP LOCKED or an equivalent conditional UPDATE.
What's inside
  • 1 diagram
  • 5 sections
  • about 44 min

Premium lessonOracle interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · Cancel anytime

Had your Oracle interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Oracle interview guide

Know what Oracle asks before you walk in.

19 coding · 4 system design · 18 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.