System Design: The Distributed Task Scheduler
Learn about the basics of designing a distributed task scheduler.
A task is a piece of computational work that requires resources (CPU time, memory, storage, network bandwidth, and so on) for some specified time. For example, uploading a photo or a video on Facebook or Instagram consists of the following background tasks:
- Encode the photo or video in multiple resolutions.
- Validate the photo or video to check for
copyrights, and many more.content monetization Content monetization is a way of leveraging content so that a service can profit from it as users consume it.
The successful execution of all the above tasks makes the photo or video visible. However, a photo and video uploader does not need to stop the above tasks to complete.
Another example is when we post a comment on Facebook. We don’t hold the comment poster until that comment is delivered to all the followers. That delivery is delegated to an asynchronous task scheduler to do offline.
In a system, many tasks contend for limited computational resources. A system that mediates between tasks and resources by intelligently allocating resources to tasks so that task-level and system-level goals are met is called a task scheduler.