educative.io

How can task submitter send an error message to client?

“If a task goes beyond its promised or required resource use, that task will be terminated, and the status is sent back to the task submitter, which will notify the client about the termination of the task through an error message”
Is that an HTTP error message? How is that possible? Haven’t we already sent a response when we accept the task and put it into queue?


Course: Grokking Modern System Design Interview for Engineers & Managers - Learn Interactively
Lesson: Design of a Distributed Task Scheduler

Hi Hedyeh

The termination of a task due to exceeding promised or required resource use is not necessarily communicated through an HTTP error message. When a task is accepted and placed in the queue, the system usually provides an acknowledgment to the client. However, if the task surpasses its allocated resources during execution, it can be terminated, and this status is communicated to the task submitter. Instead of using HTTP error messages, the system likely employs a specific communication mechanism, such as callbacks or notifications, to inform the client about the termination of the task. This ensures that clients receive accurate feedback regarding task completion or termination, even if it deviates from the initially promised resource use.

Thank you