<@ULVA73B9P> Is it possible to limit concurrency p...
# ask-marvin
j
@Marvin Is it possible to limit concurrency per worker? I have a flow which should have a concurrency of 1 per worker not globally but per worker. I am using Prefect 3
m
In Prefect 3, you can manage concurrency limits through work pools and work queues. Concurrency limits can be set at the level of work pools, which would affect all workers within that pool. However, setting a concurrency limit per individual worker directly is not explicitly mentioned in the documentation. Here's a general approach to set concurrency limits: 1. Work Pools: You can set a concurrency limit on a work pool using the Prefect CLI. This restricts the number of concurrent runs for flows managed by that pool. For example, if a work pool has a concurrency limit of 5, it will only allow up to 5 concurrent flow runs across all workers in that pool. 2. Tags: You can also use tags to manage task run concurrency limits. This involves setting a limit on specific task tags, which can be done via the Prefect CLI or programmatically using the PrefectClient. For more information, you can check the following links: - Task Run Limits - Work Pools Unfortunately, Prefect doesn't provide a built-in mechanism to enforce concurrency limits per individual worker. You might need to implement custom logic to achieve such behavior.