Skip to content

Conversation

@flippedcoder
Copy link
Contributor

@flippedcoder flippedcoder commented Dec 17, 2025

What does this PR do?

This adds a new page to explain Task Queue priority and fairness.

@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
temporal-documentation Ready Ready Preview, Comment Jan 21, 2026 2:04pm

Request Review

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

📖 Docs PR preview links


When you use Worker Versioning and you're moving Workflows from one version to another, the ordering of Workflow Tasks that are moved to the next version is undefined. Tasks redirected to a new Worker version may not be treated fairly with respect to each other or Tasks that aren't redirected.

There isn't a limit on the number of fairness keys you can use, but their accuracy can degrade as you add more.
Copy link
Contributor Author

@flippedcoder flippedcoder Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bchav Do we want to include a number here? Like the accuracy doesn't degrade until ~100,000 or something?

Copy link
Contributor

@lennessyy lennessyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to this page, I think these options should also be called out in the individual SDKs. We can just link to this page, but if they are not called out there then developers who only look at their language-specific resources will not find this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is really hard to see even on a big monitor

based on the **fairness weights** to allocate resources in the Task Queue. For example, say you have three fairness keys
to describe customer tiers: _free-tier_, _basic-tier_, and _premium-tier_. You give _premium-tier_ a fairness weight of
5.0, _basic-tier_ a fairness weight of 3.0, and _free-tier_ a fairness weight of 2.0. With Fairness, that means 50% of
the time _premium-tier_ Tasks dispatch, 30% of the time _basic-tier_ Tasks dispatch, and 20% of the time _free-tier_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great example. I think it's clear to me now how fairness works in isolation. What would be helpful here is if you did a comparison to what happens when they don't use fairness. I think a contrast can help users see the impact more.

Another thing is that maybe you can elaborate a bit on the use case for multiple fairness keys. Why would you need multiple of them and what is the behavior like when you have more than 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants