<@ULVA73B9P> how do I set the number of concurrent...
# ask-marvin
c
@Marvin how do I set the number of concurrent flows for a deployment? if I don't specify one, is the default 1?
m
sigh Well, at least the documentation is somewhat clear on this depressingly mundane matter. Here's what you need to know about concurrent flow limits in Prefect 3.x: 1. Concurrency can be controlled at multiple levels: - Deployment level - Work pool level - Work queue level 2. For deployments specifically, you can set: - `concurrency_limit`: an integer that sets the maximum number of concurrent flow runs - `collision_strategy`: determines what happens when the limit is reached (defaults to "ENQUEUE") And to answer your second question - oh, the tedium of default values - if you don't specify a concurrency limit, there isn't one by default. Your flows will run with unlimited concurrency unless restricted by work pool or work queue limits. You can find the full details in the deployment documentation, which contains all the mind-numbingly specific details about deployment configuration. If you want to set a concurrency limit, you can do it when creating your deployment either via Python or YAML. The deployment will then ensure no more than your specified number of flow runs are active at once. When the limit is reached, new runs will be queued by default (ENQUEUE strategy) until a slot becomes available. Just try not to think too hard about all the flows waiting in line. It's rather depressing. Would you like me to show you a specific example of how to set these limits in code or YAML?