-
Notifications
You must be signed in to change notification settings - Fork 822
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
GameServers in allocated state can respond to fleet updating #2682
Comments
Super interesting problem! We were discussing this a bit internally and came up with some other user journeys. Would love feedback on the below design. ObjectiveIn a usage of Agones in which RequirementsThere are two scenarios of which to consider in which we might want to notify a Fleet Update (Rolling/Recreate)This is a standard Fleet Rolling Update. When a rolling update starts, there should be an ability to notify any Out of scope: Notifying GameServers when a rolling update has finished. Canary Deploy Through Multiple FleetsIf the user is updating a Fleet through a “Two (or more) Fleets Strategy” to canary a new version there is no rolling update, but instead the current Fleet is manually scaled down, while the replacement Fleet is manually scaled up. In this scenario, the only indication that a Fleet is being replaced, is that the Fleet replica count could drop below the number of Total Allocated GameServers - Fleet Replica Count As an example - if a It is worth noting that the Other NotesThis solution must also be backward compatible. Ideally, if not utilised, this solution should not put any extra load in the Kubernetes control plane. Ideally, the solution should be extensible, if other notification strategies are required over time. BackgroundDesign ideasThe general idea is that on either a This will serve two purposes:
Example yaml configuration:
This will work the same across Fleet resizing and Rolling Updates, in that the implementation will respond to the underlying The benefit of the above configuration is that if it is not applied, then no extra overhead exists for a Fleet. The user has to actively opt-in, and also provide what labels and/or annotations make sense for their Agones implementation. This should also be developed behind a feature flag, I would suggest: Outstanding Questions:
Alternatives consideredRather than (or in addition to) updating labels, we could instead send a This has several advantages:
But there are the following disadvantages:
That all being said, if we get user feedback to have an option of deleting Allocated GameServers on Fleet update (to create a |
I had similar concerns. https://agones.slack.com/archives/C9DGM5DS8/p1647513867843959 Now, inevitably, when the match server makes an assignment request to agones, by entering the version in the selector, The first thing I thought about before was how to use The 'onUpdate' method, on the other hand, seems to have a more natural flow. |
Community feedback from my livestream when I wrote the above design: Brittan J Thomas replacing the key |
@zmerlynn - This might interest you, since it's similar to disruption cases you've been exploring. |
Updated the design a little bit. Was looking at this again, and realised that I don't think we need two different configs for Fleet scaling and Fleet updates - they are essentially the same thing from a GameServer point of view -- we have too many Allocated GameServers. One thing I did note though, is that when doing a rolling update, I saw the following on two kubectl get gsset
NAME SCHEDULING DESIRED CURRENT ALLOCATED READY AGE
simple-game-server-hzh2h Packed 3 3 0 3 49s
simple-game-server-x4m5s Packed 1 2 2 0 2m51s ( We can see that it's got a desired state of |
Right as I wrote this, i scaled the Fleet up to 10 items, and confirmed that it is, since we end up at: $ kubectl get gsset
NAME SCHEDULING DESIRED CURRENT ALLOCATED READY AGE
simple-game-server-hzh2h Packed 8 8 0 8 18m
simple-game-server-x4m5s Packed 0 2 2 0 20m TL;DR - no need to edit any of the |
Getting close on this... not sure if it'll make RC next week, but definitely the release after I reckon. |
Feature gate for work on googleforgames#2682
Feature gate for work on googleforgames#2682
Feature gate for work on #2682
Implementation of yaml and backing Go code for the CRDs for supporting Fleet Allocation Overflow tracking. Work on #googleforgames#2682
Implementation of yaml and backing Go code for the CRDs for supporting Fleet Allocation Overflow tracking. Work on googleforgames#2682
Implementation of yaml and backing Go code for the CRDs for supporting Fleet Allocation Overflow tracking. Work on googleforgames#2682
Release is next Tuesday. I have the functionality pretty much done, but still splitting PRs. This might slip into the next release... but we'll see how will go. I give it 60% that it will land in time. |
Implementation of yaml and backing Go code for the CRDs for supporting Fleet Allocation Overflow tracking. Work on #2682
Given that 1.30.0 is Tomorrow, this will slip to 1.31.0. |
Just a small question, should we also apply this to the |
...and it slipped again, because GDC. |
That's a good question. I'm leaning towards "no" , or at least "not yet" (and wait and see what feedback is)? Just because since reservation tends to be on a per-gameserver basis, each game server doesn't know if it should let go of a reservation or not if there's a new version - as if they all do, there are no gameservers for anyone to go to. I think it's probably better to allow reservation -> Ready / Allocated flow to continue through, and then let the process manage things from there -- less opportunity for disruption. But definitely would like to be open to perspectives from people actually using Reserved. |
Makes sense to me. Also, thinking about the potential use cases, I feel that |
Functional implementation and testing of applying labels and/or annotations to any `Allocated` `GameServers` that are overflowed past the configured replica count. Next ➡️ write some guides to close out the ticket. Work on googleforgames#2682
Functional implementation and testing of applying labels and/or annotations to any `Allocated` `GameServers` that are overflowed past the configured replica count. Next ➡️ write some guides to close out the ticket. Work on googleforgames#2682
Functional implementation and testing of applying labels and/or annotations to any `Allocated` `GameServers` that are overflowed past the configured replica count. Next ➡️ write some guides to close out the ticket. Work on googleforgames#2682
Functional implementation and testing of applying labels and/or annotations to any `Allocated` `GameServers` that are overflowed past the configured replica count. Next ➡️ write some guides to close out the ticket. Work on googleforgames#2682
Functional implementation and testing of applying labels and/or annotations to any `Allocated` `GameServers` that are overflowed past the configured replica count. Next ➡️ write some guides to close out the ticket. Work on googleforgames#2682
* Allocated GameServers updated on Fleet update Functional implementation and testing of applying labels and/or annotations to any `Allocated` `GameServers` that are overflowed past the configured replica count. Next ➡️ write some guides to close out the ticket. Work on #2682 * Review updates.
Added documentation to the "Fleet Update" section on how notifications can occur for Fleet updates and related operations. Closes googleforgames#2682
Added documentation to the "Fleet Update" section on how notifications can occur for Fleet updates and related operations. Closes #2682 Co-authored-by: Mengye (Max) Gong <[email protected]>
Is your feature request related to a problem? Please describe.
a question about fleet update. it seems that the controller leaves GameServers in allocated state alone in the process of fleet updating, whether rolling or recreating. but some of our gameservers have long ttls (they are not specific to battles, but players can enter and leave at any time). so i`m wondering how to tell these gameservers to start the shutting down procedure (start by telling players to leave game or just kicking them out).
Describe the solution you'd like
We could set an annotation / label (I think an annotation would be better?) on an Allocated GameServer that is left behind after a Fleet update - then the WatchGameServer SDK could pick it up?
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: