You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How easy would it be to implement a custom scheduler (compute(*values, get=custom_sched.get))?
I'm thinking about a more robust scheduler (timeouts/retries/lostworkers/durability),
even though it might be less flexible/performant...
For production workloads (can't lose tasks) this might very helpful, and also for users which already have a cluster of workers they could use for ad-hoc computations (not celery's strongest side).
Generally sending tasks to a Celery queue is very similar to sending tasks to a multiprocessing.Pool, so maybe dask.local.get_async would be a good place to start?
Generally sending tasks to a Celery queue is very similar to sending tasks to a multiprocessing.Pool, so maybe dask.local.get_async would be a good place to start?
Yes, if you can recreate the Pool.get_async then you can use get_sync today. I believe that there is a Mesos solution out there that does this. I would love to see this. From my perspective it would be a good demonstration that Dask can indeed play nicely with other systems.
I'm thinking about a more robust scheduler (timeouts/retries/lostworkers/durability),
To be clear retries and lost workers are both supported in the distributed scheduler. Timeouts and durability less so. Timeouts would be easy-ish. High availability (which I am, perhaps erroneously, equating with durability) less so.
By durability, I mean that once a task is sent it is expected to arrive to a worker, even in the event of a scheduler restart/crash (in celery's case it is possible by configuring queue persistence in redis/rabbitmq).
Also, this might allow greater scalability since it avoids a central python scheduler
By durability, I mean that once a task is sent it is expected to arrive to a worker, even in the event of a scheduler restart/crash (in celery's case it is possible by configuring queue persistence in redis/rabbitmq).
Understood. Thanks for the clarification.
Also, this might allow greater scalability since it avoids a central python scheduler
Interestingly our efforts to move past Python for the central scheduler haven't been as effective as desired. Python is not terrible for highly dynamic workloads like this. There is enough complex data structure access and jumping around in memory that most system are equally terrible :)
Activity
mrocklin commentedon Mar 8, 2018
Yes, if you can recreate the
Pool.get_asyncthen you can useget_synctoday. I believe that there is a Mesos solution out there that does this. I would love to see this. From my perspective it would be a good demonstration that Dask can indeed play nicely with other systems.To be clear retries and lost workers are both supported in the distributed scheduler. Timeouts and durability less so. Timeouts would be easy-ish. High availability (which I am, perhaps erroneously, equating with durability) less so.
linar-jether commentedon Mar 8, 2018
@mrocklin Thanks, I'll give it a shot!
By durability, I mean that once a task is sent it is expected to arrive to a worker, even in the event of a scheduler restart/crash (in celery's case it is possible by configuring queue persistence in redis/rabbitmq).
Also, this might allow greater scalability since it avoids a central python scheduler
mrocklin commentedon Mar 8, 2018
Understood. Thanks for the clarification.
Interestingly our efforts to move past Python for the central scheduler haven't been as effective as desired. Python is not terrible for highly dynamic workloads like this. There is enough complex data structure access and jumping around in memory that most system are equally terrible :)
linar-jether commentedon Mar 18, 2018
@mrocklin Turns out celery plays well with dask, initial implementation works pretty fast and allows us to easily reuse our already running cluster.
Published the initial implementation here:
https://gist.github.com/linar-jether/0cc77e386c4a1b591bf3963062f0eaef
Note that all scheduling is done client-side, so no single point of failure should exist (depending on broker/backend of choice for celery).
Appreciate your feedback 😄
jakirkham commentedon Jun 29, 2018
Might be worth rolling this into a small
dask-celerylibrary in the org if you are interested.linar-jether commentedon Jul 1, 2018
Sure, would need some tests to make sure this works with other parts of
dask, we've only done some rather simple use casesmrocklin commentedon Oct 24, 2018
This was done and a solution lives at https://gist.github.com/linar-jether/0cc77e386c4a1b591bf3963062f0eaef