Concurrency and fair queues
Trigger.dev provides flexible concurrency control to manage multiple task runs efficiently. Configure tasks to run sequentially or in parallel, and use concurrency keys to create custom queue logic for different users or tiers.
One at a time
Execute your tasks one at a time
This is a useful technique where you wait for a run to complete before the following task is executed.
concurrentLimit: 1
In parallel
Execute your tasks in parallel
By setting a high concurrency value along with batch triggering, you can execute many tasks in parallel. This approach is ideal for high-priority tasks with variable spikes.
concurrentLimit: 3
Per-tenant queuing
Configure separate queues per user using concurrency keys
There are many situations where you may want different concurrencies; if certain users are on higher tier plans for example. With concurrency keys you can create bespoke queue logic for each of your users.
Granular control over your user’s concurrency allows you to prioritise your most valued user’s tasks.