Katkat

Design an Async Job Scheduler

FigmaSoftware Engineer · Onsite

Last updated

This question evaluates a candidate's ability to design reliable, fault-tolerant asynchronous job scheduling systems, covering concepts such as immediate versus delayed execution, failure handling, retries, duplicate execution prevention, worker crashes, scheduler failover, and the feasibility of exactly-once semantics.

Design an asynchronous job scheduler service.

The service must support two job types:

  1. Immediate jobs: submitted jobs that should run as soon as possible.
  2. Delayed jobs: submitted with a delay or scheduled timestamp, such as "run this job in 1 hour". Once the scheduled time arrives, the job should run as soon as possible.

Focus especially on reliability and failure handling. Discuss how the system handles worker crashes, scheduler failures, retries, duplicate execution, and whether "exactly once" execution can be achieved.