Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Counters & Lists landing page and doc improvements #3649
Counters & Lists landing page and doc improvements #3649
Changes from all commits
506397a
2cdf05e
dc417a6
a33e712
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 total, not available.
agones/pkg/gameserversets/gameserversets.go
Lines 176 to 182 in 589f77b
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.
Oh interesting! I didn't expect that, I just assumed they would be the same to be honest!
I do now have some vague memories of conversations on this topic -- but I can't remember the exact reason we did this.
Something to do with how the Autoscaler works out if it can scale down or not, and matching that logic here so it aligns as close as possible, if I remember correctly?
Can you remind me again of why this works this way, so I can capture it in the docs and head off any potential confusion here.
Having two different strategies for
priorities
in different places might be confusing (🤔 maybe), but that being said, I always expected the CUJ for this to be more on the count/list length value and capacity to be a non-factor 🤷🏻 .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.
Yeah, I remember talking about it too, but can't find it in chat or meeting notes.
Since the autoscaler never removes allocated game servers, what this really does is sort the non-allocated game servers, and remove those in order of largest or smallest capacity (after sorting by packed strategy). Which I think we decided was more important than "available capacity" for non-allocated game servers.
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.
So I'm digging into the FleetAutoscaler, and I'm seeing that it's also working on available capacity (which makes sense to calculate the buffer).
agones/pkg/fleetautoscalers/fleetautoscalers.go
Line 239 in c35bbf1
As a result of writing the docs, and seeing the different approaches now side by side, I'm thinking we should file a ticket to change the sorting strategy for Fleet scale down to be based on available capacity, and implement it in a separate PR?
9.9 times out of 10, I expect it to be exactly the same as set capacity with a count/length tiebreaker (since I expect dynamic capacities in GameServers that are Ready to be minimal, and counts > 0 in a Ready GameServer to be even less of an occurrence) - but it means that the concepts and the documentation across all functionality align, and are easier to reconcile when working with it?
WDYT @igooch ? If you're happy, I'll file the ticket and make the change - looks like it should be relatively minimal.
Then we can also work out how we want to manage the switchover in docs 😄 but lemme know what you think.
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.
The fleet autoscaler buffer is calculated based on available capacity, the priorities are not.
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.
Just chatting offline - doesn't seem like a huge concern if I go do the work. So will pause on this doc, and see if it's onerous to change the ordering strategy on Fleet scaledown, and then the documentation is much easier to write.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
We use priorities in two different places in two different ways. The fleet autoscaler uses total capacity (see comment in fleet.yaml), and the game server allocation uses available capacity.
agones/pkg/gameserverallocations/allocation_cache.go
Lines 297 to 302 in 589f77b
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.
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.