Ronald Sam
03/12/2025, 9:26 PMMarvin
03/12/2025, 9:26 PMconcurrency_limit
and strategy
for a deployment in a prefect.yaml
file, you can configure these at the deployment level. Prefect 3.x allows you to manage multiple deployment configurations within a single prefect.yaml
file.
Here's a basic structure for how you might define these settings:
yaml
deployments:
- name: my_deployment
flow_name: my_flow
concurrency_limit: 10 # Set the concurrency limit here
strategy: round_robin # Example strategy
work_pool:
name: my_work_pool
### Key Points:
- Concurrency Limit: This restricts the number of concurrent flow runs. It can be set directly in the deployment configuration.
- Strategy: Determines how tasks are dispatched. Common strategies include round_robin
or first_in_first_out
.
### Additional Resources:
- Concurrency Limits Documentation
- Prefect YAML Documentation
Remember, each deployment must have a unique name
field, and you can manage these deployments independently. If you're using Prefect 3.x, note that some concepts from Prefect 2.x, like agents, have been replaced by workers, and work pools replace infrastructure blocks from prefect.infrastructure
.Ronald Sam
03/12/2025, 9:27 PMcollision_strategy
for the concurrency limit