Can I run more than one game session on a single game server process?

Do I need to run as many server processes as number of game session I want to handle by server?
I have one game server connected to to GameLiftLocal and when i try to start second game session using CreateGameSession GameLiftLocal throws FleetCapacityExceeded error.

I know that I can configure only up to 50 processes on single instance.

I need to handle 10000 game sessions each one for 2 players? Should I fork separate threads in single process and in each thread call:
InitSDK and ProcessReady to extend fleet capacity?

Hey @pablo666 -

GameLift currently supports 1 game session per game server process. As you correctly point out, the maximum is 50 processes per instance which means for your game, GameLift can manage 50 game sessions per instance, each with 2 players.

Forking threads within the same process is a clever idea but will still not work because the internal routing logic within GameLift only considers 1 game session per game server process. The other threads would remain idle since GameLift will never route a game to them.

For now to support 10,000 game sessions, you would need to configure your fleet to have 200 instances each managing 50 server processes.

Your suggestion that GameLift support multiple game sessions per server process is a good one and we do know of a few game types that follow that model. We will consider adding this feature to future GameLift updates. Thank you for reaching out!

This is a very important feature. For games such as ours (https://tinyrts.com) that are 1v1 RTS, pretty light network traffic, we should be able to scale very well on a single instance.

The arbitrary cap at 50 processes forces us to (50 * 2 users) 100 users maximum per instance regardless of how well we optimize the code. Being able to support multiple game sessions per server process would enable us to maximize our cost efficiency.

We’d certainly love to see this request prioritized.

Is there a link or further information on the progress of this feature? My game is also light on the Networking and would love to be able to host multiple game sessions per process

Updating GameLift to support multiple game sessions per process is certainly a request we hear from other game developers and one we are considering. Just today we released FleetIQ and Spot instances [1] that might help you reduce costs even though GameLift continues to support only 1 game session per process.

[1] https://aws.amazon.com/blogs/gamedev/reduce-cost-by-up-to-90-with-amazon-gamelift-fleetiq-and-spot-instances/

It looks like this functionality has been added. “A fleet can have many instances, each one capable of hosting multiple simultaneous game sessions .” - https://docs.amazonaws.cn/en_us/gamelift/latest/developerguide/gamelift-howitworks.html

I assume this works automatically by having each game process use a different port. Is that correct?

Yes, each instance in your fleet can run multiple copies of your game server; each game server can host a single game session. Each server runs on it own port.

You set the port in the ProcessParameters of the ProcessReady call along with the log path for that particular server.

For now the only restrictions are that each game server can only host one game sessions at a time and you can only host 50 game servers per instance.