question

Artur Czapiewski avatar image
Artur Czapiewski asked

Is it possible to host multiple game sessions on one vm instance?

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?

Custom Game ServersMatchmaking
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered

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.

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Artur Czapiewski avatar image Artur Czapiewski commented ·

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.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ Artur Czapiewski commented ·

By default, the VM can only configue 60 ports for all sessions, hence 60 servers per machine is the maximum limit.

0 Likes 0 ·
Artur Czapiewski avatar image Artur Czapiewski Seth Du ♦ commented ·

Thank you for help

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.