-
Notifications
You must be signed in to change notification settings - Fork 50
Description
The InitialPlayers and the ConnectedPlayers properties on the GameServerDetails CRD were initially on the GameServer CRD.
The reasoning for creating the GameServerDetails CRD and moving these two properties there was
- minimize the impact the ConnectedPlayers updates would have brought to GameServer reconciler
- minimize the amount of memory on the controller since they would be cached. We've seen over 200 connected players on a single game
However, the impact of just the InitialPlayers might not be that big. In a situation with 10000 GameServers and 16 InitialPlayers with a 10 byte username, the overall memory would be 100001610 ~ 1.5MB. For 100k GameServers, it would be 15MB, so still pretty small. Consequently, it would be beneficial to move the InitialPlayers back to the GameServer CR since this would solve another potential issue we have with the allocation API service creating the GameServerDetail CR and failing, which, in extreme edge case scenarios with K8s API Server failing, could leave the cluster in a semi-OK state (essentially, unusable standingBy servers).
Consequently, we should
- move the InitialPlayers to GameServer CR
- simplify the allocation logic
- have the NodeAgent create the GameServerDetail CR when the GameServer is allocated
This will be a breaking change.