Hello guys, I am wondering if there is a way to as...
# ask-community
j
Hello guys, I am wondering if there is a way to assign flows to specific workers when creating a deployment/flow_run. For my case, each worker is connected with a device and thus being unique. Is it proper to manage different workers (devices) in one Workpool or having them as separate Workpools?
c
Hey Jackie! Workers are intended to be stateless by default; what this means is that you need to use either work pools or work queues within work pools to manage work going to a specific worker (assuming you don't duplicate / horizontally scale your workers). In that case, I recommend either using 1 work pool per worker, or 1 work pool with many work queues, one per worker. To determine which is best for your setup, the main question is whether each worker is intended to submit the exact same job type or different types. If they are all submitting the exact same job definition, then using 1 work pool will be simpler as you can update all of their job definitions in one go - you can use the
--work-queue
CLI flag on the worker to point it at one or more specific queues within a work pool. If their job definitions / types are slightly different, then using different work pools for each worker will be easier to manage. Hope that helps!
❤️ 1
j
Thank you so much!
🫡 1