-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fully Adaptive Stateless Worker #9378
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
Conversation
…plify useage of attribute
src/Orleans.Core.Abstractions/Concurrency/GrainAttributeConcurrency.cs
Outdated
Show resolved
Hide resolved
src/Orleans.Core.Abstractions/Placement/StatelessWorkerPlacement.cs
Outdated
Show resolved
Hide resolved
src/Orleans.Core.Abstractions/Placement/StatelessWorkerPlacement.cs
Outdated
Show resolved
Hide resolved
…nt.cs Co-authored-by: Reuben Bond <[email protected]>
…nt.cs Co-authored-by: Reuben Bond <[email protected]>
@ReubenBond I've address your comments, and regarding the unsynchronized access: I've handled it (please have a look), otherwise I've ideally would have chosen a |
@ledjon-behluli does this branch need a push? The build is failing due to:
|
@ReubenBond yes, please check discord on the thread regarding the opt-out and property-based approach. Let me know if you're ok with that |
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.
LGTM - I added a question and pushed some changes. My advice about using a property for StatelessWorkerAttribute was bad - I've changed that in my commit.
Please take a look and let me know if you'd change anything.
This PR introduced adaptive scale-down for stateless worker grains. As the "workers" of a StatelessWorker are regular grain, their deactivation currently is left to the activation collector. For on-going load this is not a problem, but for burst-like loads the workers sit idle in memory when they can be collected.
Adaptive scale-down is optional and does not incur overhead when not used.
Users can make use of it in 2 ways:
EDIT: 3/21/25
After some iterations the above statements are not valid anymore.
The feature is now opt-out
Directly on the grain implementation:
An in-depth explanation can be found here: https://www.ledjonbehluli.com/posts/orleans_adaptive_stateless_worker/
Microsoft Reviewers: Open in CodeFlow