Skip to content
StackDecode
System Design
20. System Design Case StudiesAnimated

Distributed Task Scheduler

Run jobs at the right time, reliably.

The idea

A scheduler stores jobs, picks due ones, and assigns them to workers with leases.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

Job submitScheduler (lead…Job storeWorker 1Worker 2
  • client
  • gateway / proxy
  • service
  • cache
  • data store
  • queue / stream

Jobs are stored durably with a run time.

step:
1/4
at:
Job submit
1/10

The green dot is a request moving through the system.

Step by step

  1. 1Store a job and schedule
  2. 2Scheduler finds due jobs
  3. 3Assign to a worker
  4. 4Retry on failure

Where it is used

Cron at scale.

Watch out for

Duplicate execution and clock drift.

Related