Citi / scaler

Efficient, lightweight and reliable distributed computation engine
Apache License 2.0
12 stars 4 forks source link

Prevents the scheduler to store task's data #15

Open rafa-be opened 2 months ago

rafa-be commented 2 months ago

Scheduler currently stores the task's data until it finishes. This basically doubles the memory usage as the data is stored by the worker too.

We would like to add a new mode to the scheduler in which it does not store the task data.

This causes two issues:

sharpener6 commented 2 months ago

It should have 2 modes:

rafa-be commented 1 month ago

Isn't there some overlap with this issue: https://github.com/Citi/scaler/issues/23 ?

sharpener6 commented 1 month ago

@rafa-be

I closed #23 as I cannot mark it as duplicate issue

Currently, scaler scheduler is keeping the task object in the memory so if worker died, scheduler will allocate the task to other workers, but for memory efficiency, we will need have a mode that scheduler doesn't keep the task once sent to worker, so there are some behavior changes when this

keep task:

when task failed due to worker get disconnected, scheduler will reassign to another worker to do
when balancing tasks, scheduler just need task ids from busy worker and send to other workers

do not keep task:

when task failed due to worker get disconnected, scheduler will just return failed result to Client
when balancing tasks, because scheduler doesn't have task content at all, so it will ask busy workers to return not only task ids, but also task contents so it can reschedule to other workers