-
Notifications
You must be signed in to change notification settings - Fork 810
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
GameServer Fleets #70
Comments
@EricFortin - I added a section on what to do when the |
@markmandel I think it makes sense and is what I would be expecting of something running on a kubernetes cluster. We just need to adapt it to take the new state into consideration. It should recreate/update only game servers that aren't allocated yet. Moreover, once a non-updated game servers becomes free again, it should be updated before being reallocated. At the beginning, we might solve this issue by recreating any container where games have ended but at some point, games will want persistence for their game server process. |
SGTM. Adjusted the above to make sure it was clear that I had a question about your statement here:
My thought here was very much that when a From my understanding - we were all working from the assumption/opinion that a When you said "but at some point, games will want persistence for their game server process" - do you meant the GameServer is going to reset it back to a zero state? rather than exit, or do you mean something else? |
TL;DR. The assumption holds My point was mainly that games might want to control server life cycle themselves and not tie it to a game session. It could mean having the server becoming available again to host another "session", which is a concept that is missing at the moment. Should we add it? Having a server process die at the end of a match applies well to a FPS but not necessarily to a PvE but I guess we can still consider that the server process will exit when it is ready, or instructed to become so, to be swapped out by an updated container. It might just take a long time(hours, not weeks). |
I'm wondering if the |
@EricFortin We most likely want to create new game sessions in a clean environment every time and not reuse previous process. In a PvE, we wouldn't want cheaters to leave any bad states in the engine memory or on disk. I suppose there's a trade off to be made between good isolation and initialization time with "hot" server processes. I'd rather have better isolation. What do you think? |
@EricFortin Ah yes - good point (thanks for the explanation). I think when we start looking more at PvE - there are several strategies we could look at - maybe a SDK method of My current thought for getting an Allocated GameServer - is to essentially follow the
This stays nicely within the K8s paradigm. WDYT? (I can also write it up above with some examples if that helps) |
@alexandrem I'm more inclined as well to isolation - but I feel like we could try with better isolation (processes get killed), and see what the actual implications are with a real system, and make pragmatic decisions once we have more data (i.e. then add options to move out of Allocation if needed), rather than decide at this stage. WDYT? |
It's probably too early to decide on the fate of this feature. We certainly can have this discussion about recycling terminated game session resources later. I'd focus on keeping things really simple at this stage though. Meaning that game server allocation represents a new scheduled pod, then when players leave (or game terminated) we delete the GS pod (fleet will ensure to replace it with a fresh one). |
Like I said, I am OK with using the simple approach for now. I just wanted to mention some use cases where I know it might cause some problems so we don't make an early mistake. I am all for isolation but in some cases, this goes against certain game mode where the players come and go and game "lives" in between interactions with players so recreating it anew might defeat the feature. It all depends on the level of statefulness of game servers which I do not control. |
@EricFortin Those longer lived game sessions where players come and go (and remain non populated for some time) are an interesting use case. I suppose in the end this is controlled solely by the SDK; is game terminated or not. If not terminated, then we definitely want to keep the game session in "allocated" and not touch them. Actually, they probably should have a different state so we can track those who are empty so we can possibly remove them when the fleet size is being decreased. |
This is an interesting question - one could argue, that if the |
For those cases where life cycle is not totally dependant on game sessions, there will most probably be a "god" service that manages it all and can replace an instance by directing players to the new instance and ultimately instructs the old instance to shutdown. This use case also affects scale down event since even if we taint the node, it still can't be recycled if it's hosting a game server. This is out of scope for now but I think we will need a way to provide this feedback so something can react. |
Added some notes about how I think an Allocation should occur. These will definitely need 1.9 features. |
Webhook library to make k8s webhooks easy(er) to use, as well as setting default values on GameServers via it for when they are first created. Some refactoring of GameServer sync in the controller was required and a new PortAllocation state was created. This is also makes #70 and #10 possible to implement.
Webhook library to make k8s webhooks easy(er) to use, as well as setting default values on GameServers via it for when they are first created. Some refactoring of GameServer sync in the controller was required and a new PortAllocation state was created. This is also makes #70 and #10 possible to implement.
Webhook library to make k8s webhooks easy(er) to use, as well as setting default values on GameServers via it for when they are first created. Some refactoring of GameServer sync in the controller was required and a new PortAllocation state was created. This is also makes #70 and #10 possible to implement.
Webhook library to make k8s webhooks easy(er) to use, as well as setting default values on GameServers via it for when they are first created. Some refactoring of GameServer sync in the controller was required and a new PortAllocation state was created. This is also makes #70 and #10 possible to implement.
Webhook library to make k8s webhooks easy(er) to use, as well as setting default values on GameServers via it for when they are first created. Some refactoring of GameServer sync in the controller was required and a new PortAllocation state was created. This is also makes #70 and #10 possible to implement.
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
GameServerSets are the basic building block for Fleets. GameServerSets will be allow Fleet migrations to occur, similarly to how ReplicaSets allow Deployments to migrate one image type to another. This has not been formally documented, as this will likely be an internal CRD, and not (widely) used externally. Parent ticket: googleforgames#70
Start of "Creating a Fleet creates a GameServerSet" first PR has started over in this repository and branch |
All this commit is doing is create a GameServerSet when a Fleet is created. Also, if the Replicas in a Fleet are updated, then the owned GameServerSet's Replicas are also updated. For this commit, we are not worrying about handling updates to the Spec (e.g. new image) to the Fleet, and doing updates to a live Fleet, we are just concerned with scaling up and down. Parent ticket: googleforgames#70
All this commit is doing is create a GameServerSet when a Fleet is created. Also, if the Replicas in a Fleet are updated, then the owned GameServerSet's Replicas are also updated. For this commit, we are not worrying about handling updates to the Spec (e.g. new image) to the Fleet, and doing updates to a live Fleet, we are just concerned with scaling up and down. Parent ticket: googleforgames#70
All this commit is doing is create a GameServerSet when a Fleet is created. Also, if the Replicas in a Fleet are updated, then the owned GameServerSet's Replicas are also updated. For this commit, we are not worrying about handling updates to the Spec (e.g. new image) to the Fleet, and doing updates to a live Fleet, we are just concerned with scaling up and down. Parent ticket: googleforgames#70
All this commit is doing is create a GameServerSet when a Fleet is created. Also, if the Replicas in a Fleet are updated, then the owned GameServerSet's Replicas are also updated. For this commit, we are not worrying about handling updates to the Spec (e.g. new image) to the Fleet, and doing updates to a live Fleet, we are just concerned with scaling up and down. Parent ticket: googleforgames#70
Fleet Allocation work started over here |
Work on doing a straight replace when updating Fleet's GameServer details, can be found over here: |
Rolling update strategy work is here: |
This implements a configurable rolling update strategy for Fleets that also ensures that Allocated GameServers are not interuppted. Also includes updates to documentation. Closes googleforgames#70
This implements a configurable rolling update strategy for Fleets that also ensures that Allocated GameServers are not interuppted. Also includes updates to documentation. Closes googleforgames#70
This implements a configurable rolling update strategy for Fleets that also ensures that Allocated GameServers are not interuppted. Also includes updates to documentation. Closes googleforgames#70
This implements a configurable rolling update strategy for Fleets that also ensures that Allocated GameServers are not interuppted. Also includes updates to documentation. Closes googleforgames#70
This implements a configurable rolling update strategy for Fleets that also ensures that Allocated GameServers are not interuppted. Also includes updates to documentation. Closes #70
Design
Description
Fleets are a group of warm servers that are available to be allocated to players when needed.
In Kubernetes parlance, they are the
Deployment
/ReplicaSet
to Pods, but forGameServer
sFeatures
Fleet
, with an attachedGameServerTemplate
(much like aPodTemplate
)replicas
number of HealthyGameServers
available (assuming resources exist)GameServer
becomes Unhealthy, then delete it and create it anew (we may add more options at a later date).Fleet
, this also deletes the backingGameServers
(this should be by default in Kubernetes now anyway)allocated
GameServer out of the pool.GameServer
is moved to aAllocated
state on allocation.replicas
are increased in theFleet
, the number ofGameServers
is increased to match that number (assuming resources)replicas
are decreased in theFleet
, the number ofGameServers
is decreased to match that number.GameServers
that are in anAllocated
state will never be deleted during the decreaseGameServer
template
is changed, then we will mimic aDeployment
in that we can do either aRecreate
or aRollingUpdate
to switch out the waiting warm servers.Configuration
Allocation
Allocation is done through creating a
FleetAllocation
record via kubectl or the API.For example:
The returned value from creating a
GameServerAllocation
has the details of the allocated server (And moves theGameServer
to the stateAllocated
.)For example:
Work Breakdown
GameServerSet
toFleet
asReplicaSet
toDeployment
) (GameServerSet Implementation #156)Fleet
creates aGameServerSet
(Creating a Fleet creates a GameServerSet #174)Allocation
from a fleet (Creating a FleetAllocation allocated a GameServer from a Fleet #193)Recreate
update strategy (Fleet update strategy: Replace #199)Rolling
update strategyOut of scope
Research
The text was updated successfully, but these errors were encountered: