I’d like to know if this is a good use case for dask and how to implement it.
I have a rest API endpoint that will be receiving a POST request with some parameters in a JSON object. We will be receiving about 30-60 requests a second, and the rest api needs to call a function that will take the params and return a value back to the requester. This function will take about 3-5 seconds to execute on a single core.
Therefore, we will need about 300 CPU’s as it is a CPU-intensive function. I want to use dask to spread the workload across machines.
My questions are:
Is this a good idea?
It is possible to call dask workers that are free (not currently executing a task) from the API function and how do I do that?
Does anyone have any documentation/code that can do this, on a simple level where it’s across cores instead of machines?
Thank you!