Use built-in Target Based Auto Scaling of Fleet when an outside service (not custom) is managing sessions and matchmaking

0

Use case: Trying to implement GameLift managed fleet (✔) with built-in auto-scaling (❌) when using another service initially for session management and matchmaking.

TL;DR: I'm looking for effectively a Server SDK CreateAndActivateGameSessionFromMe() call that will allow GameLift to know a session is active so that it can do Target Based Auto-Scaling based on % Available Sessions.


As phase 1 of implementing GameLift, we are looking to keep the existing service for session management and matchmaking. I have this working on a Fleet with manual scaling. The sessions all register with the existing (non-custom) service and sessions are found and joined via mechanisms on that service. GameLift Fleet very efficiently keeps the target number of servers and game processes per server running.

I would like to add the Target Based Auto-Scaling but I don't think it's possible without abandoning the other service entirely. This might be an option in the long run, but being able to just add the auto-scaling would speed up the initial GameLift adoption.

GameLift Target Based Auto-Scaling is based off available sessions. This seems then to require at the very least the use of the Game Session Management layer in addition to Infrastructure. Looking at https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api-interaction-vsd.html.

If there is a mechanism where the loaded game process upon activation by the other service could register with GameLift as active, it would allow use of the Target Based Auto-Scaling for % available sessions. But I can't find a way to do that.

CreateGameSession() as shown in the docs and the Server API interaction diagram linked above tells GameLift to find an available session in the Fleet. I can't specify a session to activate. I'm looking for effectively a Server SDK CreateAndActivateGameSessionFromMe() call.

The Server SDK call ActivateGameSession() will return an error about the process not having an associated Game Session ID if I call it not in response to CreateGameSession()/onActivateGameSession().

Is there an option or do I need to implement custom auto-scaling by monitoring the game sessions and then modifying desired count in the fleet to auto (but not GameLift auto)-scale?

profile picture
mjans71
demandé il y a 2 ans247 vues
1 réponse
2
Réponse acceptée

Hi,

GameLift AutoScaling supports:

  1. Target-based autoscaling (on PercentAvailableGameSessions metric) and
  2. Rule-based autoscaling (on a variety of different metrics)

See https://docs.aws.amazon.com/gamelift/latest/apireference/API_PutScalingPolicy.html for more information.

However, all of these metrics depend on GameSessions / PlayerSessions on the fleet being registered with the GameLift Service. If you are unable to do that, then it will not be possible to make use of GameLift Autoscaling. Currently, there is no way to Create a GameSession & Activate it from the GameLift Server SDK alone. You are correct that, at minimum, you must make use of the CreateGameSession() -> ActivateGameSession() workflow in order to create the necessary metrics (e.g. PercentAvailableGameSessions) to make autoscaling work.

In summary, you will not be able to make use of GameLift Autoscaling if you are integrating without calling one of GameLift's session placement APIs (i.e. CreateGameSession, StartGameSessionPlacement, StartMatchmaking), and will likely have to go with your proposed custom auto-scaling approach.

AWS
répondu il y a un an
profile pictureAWS
EXPERT
Toni_S
vérifié il y a un an
  • Thanks for your response. This saves me time trying to make something work that won't work :)

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions