Skip to main content

Task Queue Priority and Fairness - Interactive Walkthrough

The core idea of Task Queue Priority and Fairness is that when tasks from different workloads compete for the same Workers, Priority controls which ones get picked first, and Fairness ensures no single tenant can block others by using all the resources.

Priority

Tasks carry a priority key from 1 (highest) to 5 (lowest), defaulting to 3. Higher-priority tasks are always dispatched before lower-priority ones; within the same priority level, tasks are dispatched in arrival order (FIFO).

Fairness

Without Fairness, tasks at the same priority dispatch in FIFO order, so a backlog-heavy tenant can hog Worker capacity and delay everyone else at that level. Fairness groups tasks by a fairness key and dispatches them proportionally by fairness weight. A key with weight 2.0 is dispatched twice as often as a key with the default weight of 1.0.

Use both together when you need SLA ordering across workload types and fair distribution across tenants within each tier.

P1 · Critical
P2 · High
P3 · Normal (default)
P4 · Low
P5 · Batch