-
Notifications
You must be signed in to change notification settings - Fork 287
feat(task queues): created initial draft for priority and fairness #4080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📖 Docs PR preview links
|
27a91b6 to
a62958a
Compare
d412c87 to
db511e7
Compare
|
|
||
| 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. |
There was a problem hiding this comment.
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?
lennessyy
left a comment
There was a problem hiding this 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.
Co-authored-by: Lenny Chen <55669665+lennessyy@users.noreply.github.com>
Co-authored-by: Lenny Chen <55669665+lennessyy@users.noreply.github.com>
130606e to
0a51ab9
Compare
There was a problem hiding this comment.
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_ |
There was a problem hiding this comment.
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.
What does this PR do?
This adds a new page to explain Task Queue priority and fairness.