Gamelift autoscaling is not responsive enough

0

Hi, I am testing autoscaling for my gamelift game and I have set the min instances available to 1 and max to 9 in scaling section. I have set the buffer as 10%. But when I try to connect to game when the 1 instance that's always there is not accepting further players, most of the time a new instance is not spinning up. Instead it's trying to connect to the existing server and receives error ' The game session is not accepting new players at this time'. What I want is, instead gamelift should spin up a new instance, create game session and accept the player to that new session. how can I do that? The session spins up and connects players to a new instance when there are more than 1 instances under desired instances in scaling section and that happens when usually a lot of players are trying to connect. I want gamelift to spinup a new server for a player even if he is the only player remaining.

1 Answer
0

Hi!

Target based auto-scaling, which seems to be what you're using is the recommended approach for spinning up additional instances to handle potential player traffic. Does the number of instances ever scale past 1? If not, have you checked the AvailableGameSessions metric on the fleet. Each instance is capable of holding upto 50 server processes based on the configured RuntimeConfiguration each of which can be used to start game sessions. So if there's just the one instance it's possible that there are processes still available on that one instance - verifying the specified metric should help understand whether this is the case.

If you notice there are available server processes, you should use CreateGameSession everytime you need a new game session, and then connect the new player onto the newly created game session. This is of course assuming that you are managing the process of creating game sessions and player sessions.

What I want is, instead gamelift should spin up a new instance, create game session and accept the player to that new session

This seems like a good use case to use GameLift queues to manage your game session placements. On calling StartGameSessionPlacement, a queue will create and place the game session onto the best destination (a fleet in your case). Once the game session has been created, the queue will also create player sessions for the provided list of players. All you'll have to do is connect your player onto the game server once that placement is FULFILLED.

Note: Even with the above you'll need a auto-scaling policy on your fleet to ensure it is always scaled up to accept new player sessions.

AWS
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions