<@ULVA73B9P> I have a flow with multiple subflows....
# ask-marvin
j
@Marvin I have a flow with multiple subflows. How do I run each subflow on a different worker pool?
m
To run each subflow on a different worker pool in Prefect 3.x, you need to assign different deployments to different work pools. Each worker polls a specific work pool for runs to execute, which means you can control where each subflow runs by specifying the work pool for its deployment. Here's a concise guide on how to achieve this: 1. Define Worker Pools: Create different worker pools for each environment or execution type you want to use. Prefect supports various worker types such as
process
,
kubernetes
,
docker
,
ecs
, etc. More details can be found here. 2. Deploy Subflows: When deploying each subflow, specify the worker pool you want it to use. This is done during the deployment configuration. 3. Use Work Pools: Ensure that each worker is configured to poll the correct work pool. Workers can only execute runs from the work pools they are assigned to. For more detailed information on setting up work pools and workers, refer to the Prefect documentation on work pools and workers. If you have specific deployment configurations or need further assistance, feel free to ask.