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
已提問 2 個月前檢視次數 46 次
1 個回答
2
已接受的答案

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.

NathanD
已回答 1 個月前
profile picture
專家
Toni_S
已審閱 12 天前
  • Thanks for your response. This saves me time trying to make something work that won't work :)

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南