I have a game that is very lightweight. When testing server on something like raspberry pi I was able to fit on it 20-25 game sessions handling 50 users. Hosting one session per vm instance would be really inefficient. Is it possible to host multiple game sessions on one server instance using built in matchmaking system?
Answer by SethDu · Jun 04, 2020 at 05:21 AM
Yes. It is possible.
However, in terms of your scenario, you may just change the configuration of “Servers per machine” when creating the build. For example, 20-25 servers by machine will do the job.
If you want to host multiple sessions in single server instance, it will need extra efforts to be done. In the server build, there will be mechanism that needs to be defined on your own to host games for different groups of players. Implementing SignalR on your server build is also a workaround. In addition, you will need to implement Azure function/Cloud Script or even an external agent server to help you create the server instance and cache so that later players can join the same one. Besides, since the Multiplayer server 2.0 is session-based game server service, it is not recommended to let an instance run for too long.
Thank you for your answer. If I may I have one more question in this topic. Is there any lmit on how much "servers per machine" I have? I understand performance hit with having too many server but I need this information to know when optimization will be useless and I just need more instances.
By default, the VM can only configue 60 ports for all sessions, hence 60 servers per machine is the maximum limit.
Can I get a conceptual explanation of how a custom Matchmaker would work? 1 Answer
Is there a GSDK equivalent of SetGameServerInstanceData()? 1 Answer
Terminate Game Instance reporting game_ended to external matchmaker 1 Answer
ConnectionError when calling RedeemMatchmakerTicket 1 Answer
Are game servers in multiplayer 2.0 running before a match is found? 1 Answer