Develop a task scheduler system that allows users to schedule tasks to be executed once at a specified time in the future or on a recurring basis using specified intervals. The system should efficiently manage and execute thousands of tasks with minimal delay and high reliability.
Suggested time: 45 minutes
Loading the workspace...
You schedule a daily report to run at midnight. Simple, right? Now multiply that by 100K users who all scheduled their daily tasks for midnight too. The system must fire 100K tasks within seconds of 00:00:00, ensure each runs exactly once even with multiple dispatcher instances competing, retry failures without duplicating side effects, and handle a worker crashing mid-execution. The real challenge is not running a task. It is guaranteeing that every task runs once, on time, despite failures.
The building blocks this design relies on, each explained in its own lesson.