-
-
Notifications
You must be signed in to change notification settings - Fork 747
Description
I've had a couple of independent conversations lately where folks want to interact with the scheduler from some external service. The specific use cases were external process managers that can scale Dask clusters up and down. Scaling down gracefully requires calling the retire_workers and workers_to_close methods on the scheduler RPC.
Using the RPC for this is problematic because success is heavily dependent on the dask, distributed and python versions used by the scheduler and the external manager. Mismatches can result in failure.
A workaround for this is exposing those methods via a RESTful endpoint. This would allow for a wider range of versions to be supported and means the external process manager doesn't even have to be written in Python.
In a conversation with @stephan-erb-by and @philipp-sontag-by around the Kubernetes operator in dask/dask-kubernetes#256 they mentioned they had done this via a scheduler plugin that added extra HTTP routes to the Dashboard web server. This is fine but does require a plugin to be installed for all distributed clusters managed by the external process manager (the operator in this case).
I wanted to open this issue to gauge the feeling of adding a more official REST API to the scheduler that exposes some general RPC methods via HTTP in a language-agnostic way.