Customizing run queue priority
You can define custom prioritization rules for your Dagster instance using concurrency settings.
By the end of this guide, you’ll:
- Understand how run concurrency works
- Learn how to define custom prioritization rules
- Understand how prioritization rules and concurrency limits work together
About the run queue
The run queue is a sequence of Dagster runs waiting to be executed. Dagster pulls runs from the queue and calls launch_run on submitted runs. It operates as a first-in, first-out priority queue.
For example, if three runs are submitted in the following order:
- Run
A - Run
B - Run
C
Then the runs will be launched in the same order: Run A, then B, then C. This will be true unless there are pool or run tag concurrency limits in place. The launch order can also be customized using prioritization rules, which we’ll cover later in this guide.
By default, all runs have a priority of 0. Dagster launches runs with higher priority first. If multiple runs have the same priority, Dagster will launch the runs in the order they're submitted to the queue.
Negative priorities are also allowed and can be useful for de-prioritizing sets of runs, such as backfills.