- Configure default infrastructure configurations on your work pools that all jobs inherit and can override.
- Allow platform teams to use work pools to expose opinionated (and enforced) interfaces to the infrastructure that they oversee.
- Allow work pools to prioritize (or limit) flow runs through the use of work queues.
Type | Description | You run a worker |
---|---|---|
Hybrid | a worker in your infrastructure submits runs to your infrastructure | Yes |
Push | runs are automatically submitted to your configured serverless infrastructure provider | No |
Managed | runs are automatically submitted to Prefect-managed infrastructure | No |
Work pools are like pub/sub topicsWork pools help coordinate deployments with workers
through a known channel: the pool itself. This is similar to how “topics” are used to connect producers and consumers in a
pub/sub or message-based system. By switching a deployment’s work pool, users can quickly change the worker that will execute their runs,
making it easy to promote runs through environments — or even to debug locally.
Work pool types
The following work pool types are supported by Prefect:Infrastructure Type | Description |
---|---|
Process | Execute flow runs as subprocesses on a worker. Works well for local execution when first getting started. |
AWS Elastic Container Service | Execute flow runs within containers on AWS ECS. Works with EC2 and Fargate clusters. Requires an AWS account. |
Azure Container Instances | Execute flow runs within containers on Azure’s Container Instances service. Requires an Azure account. |
Docker | Execute flow runs within Docker containers. Works well for managing flow execution environments through Docker images. Requires access to a running Docker daemon. |
Google Cloud Run | Execute flow runs within containers on Google Cloud Run. Requires a Google Cloud Platform account. |
Google Cloud Run V2 | Execute flow runs within containers on Google Cloud Run (V2 API). Requires a Google Cloud Platform account. |
Google Vertex AI | Execute flow runs within containers on Google Vertex AI. Requires a Google Cloud Platform account. |
Kubernetes | Execute flow runs within jobs scheduled on a Kubernetes cluster. Requires a Kubernetes cluster. |
Google Cloud Run - Push | Execute flow runs within containers on Google Cloud Run. Requires a Google Cloud Platform account. Flow runs are pushed directly to your environment, without the need for a Prefect worker. |
AWS Elastic Container Service - Push | Execute flow runs within containers on AWS ECS. Works with existing ECS clusters and serverless execution through AWS Fargate. Requires an AWS account. Flow runs are pushed directly to your environment, without the need for a Prefect worker. |
Azure Container Instances - Push | Execute flow runs within containers on Azure’s Container Instances service. Requires an Azure account. Flow runs are pushed directly to your environment, without the need for a Prefect worker. |
Modal - Push | Execute flow runs on Modal. Requires a Modal account. Flow runs are pushed directly to your Modal workspace, without the need for a Prefect worker. |
Coiled | Execute flow runs in the cloud platform of your choice with Coiled. Makes it easy to run in your account without setting up Kubernetes or other cloud infrastructure. |
Prefect Managed | Execute flow runs within containers on Prefect managed infrastructure. |
Work queues
Work queues offer advanced control over how runs are executed. Each work pool has a “default” queue which is used if another work queue name is not specified. Add additional queues to a work pool to enable greater control over work delivery through fine-grained priority and concurrency.Queue priority
Each work queue has a priority indicated by a unique positive integer. Lower numbers take greater priority in the allocation of work with1
being the highest priority.
You can add new queues without changing the rank of the higher-priority queues.
Queue concurrency limits
Work queues can also have their own concurrency limits. Each queue is also subject to the global work pool concurrency limit, which cannot be exceeded.Precise control with priority and concurrency
Together, work queue priority and concurrency enable precise control over work. For example, a pool may have three queues:- a “low” queue with priority
10
and no concurrency limit - a “high” queue with priority
5
and a concurrency limit of3
- a “critical” queue with priority
1
and a concurrency limit of1
Work queue statusA work queue has a
READY
status when it has been polled by a worker in the last 60 seconds. Pausing a work queue gives it a
PAUSED
status and means that it will accept no new work until it is unpaused. A user can control the work queue’s paused status in the UI.
Unpausing a work queue gives the work queue a NOT_READY
status unless a worker has polled it in the last 60 seconds.Further reading
- Learn more about workers and how they interact with work pools
- Learn how to deploy flows that run in work pools
- Learn how to set up work pools for: