PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Amazon

Design delayed job scheduler (LLD)

Last updated: Mar 29, 2026

Quick Overview

This question evaluates system design and distributed-systems competencies, including scheduling algorithms, durable persistence and recovery, concurrency control, delivery semantics, and operational concerns, and it belongs to the System Design category.

  • hard
  • Amazon
  • System Design
  • Software Engineer

Design delayed job scheduler (LLD)

Company: Amazon

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design a system that schedules a job to execute X seconds in the future (LLD). Define APIs (e.g., schedule(job, delaySeconds) -> jobId, cancel(jobId)), data structures (e.g., time wheel, min-heap by due time), persistence for durability, worker execution model, handling of restarts and clock drift, idempotency/exactly-once vs at-least-once semantics, concurrency limits, and time complexity. Provide class diagrams and discuss how you would test it.

Quick Answer: This question evaluates system design and distributed-systems competencies, including scheduling algorithms, durable persistence and recovery, concurrency control, delivery semantics, and operational concerns, and it belongs to the System Design category.

Related Interview Questions

  • Design a cloud database write path and recovery - Amazon (hard)
  • Design a replicated cloud storage service - Amazon (hard)
  • Measure platform success and drive adoption - Amazon (medium)
  • Design multi-tenant ingestion and processing platform - Amazon (medium)
  • Design globally consistent metadata service - Amazon (medium)
Amazon logo
Amazon
Aug 7, 2025, 12:00 AM
Software Engineer
Onsite
System Design
13
0

Design a Delayed Job Scheduler (LLD)

Design a service that schedules a job to execute X seconds in the future with second-level accuracy. Produce a low-level design that covers APIs, data structures, persistence, execution model, and operational concerns.

Assume:

  • Second-level precision is sufficient.
  • The system must survive process restarts without losing scheduled jobs.
  • At-least-once delivery is acceptable by default; discuss options for exactly-once.

Requirements

  1. APIs
    • schedule(job, delaySeconds) -> jobId
    • scheduleAt(job, epochMillis) -> jobId
    • cancel(jobId) -> success/failure
    • getStatus(jobId) -> job metadata
    • Optional: reschedule(jobId, newDelaySeconds)
  2. Data structures: propose and justify (e.g., min-heap by due time, timing wheel, or hybrid) including time/space complexity.
  3. Persistence and durability: how jobs are durably stored and recovered after restarts/crashes.
  4. Worker execution model: how jobs are dispatched and executed; leasing/ack model.
  5. Restarts and clock drift: recovery logic and timekeeping choices.
  6. Delivery semantics: idempotency, at-least-once vs exactly-once trade-offs.
  7. Concurrency limits: global and per-tenant limits; fairness.
  8. Time complexity: for schedule, cancel, due job retrieval.
  9. Class diagrams: main classes, relationships, and key methods.
  10. Testing: strategy across unit, integration, reliability, and performance.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Amazon•More Software Engineer•Amazon Software Engineer•Amazon System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.