question

karan Sharma avatar image
karan Sharma asked

How to auto scale servers ?

my game is multiplayer which has 1v1 matches in it. I have coded the server side of game in such a way that it can host multiple matches in a single server instance. Now, I don't know to auto scale playfab multiplayer servers...

The way I want them to scale is...... create 1 single server at the starting . then when a new request for match occurs place that it in the running server and keep on doing it until the concurrent matches count reaches 10 and if some more request come after that spin another server container/build.

Now when some matches will get finished naturally the concurrent matches count will go down for the existing builds/instances and if then new match request comes place them in the existing server builds/intances until they again the concurrent match count reaches 10. How can I achieve this kind auto scaling ?

multiplayer
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

·
Sarah Zhang avatar image
Sarah Zhang answered

Could you please clarify why you need to host ten matches on one server instance? For clarification, if you are using PlayFab Multiplayer Servers, we will charge you based on consumption of VM cores, not based on the number of server instances. You can host more server instances on one VM to reduce the consumption of cores. And we would suggest you only host one match on one server instance, so that you can directly use the server scalability provided by PlayFab. You can check this documentation - Billing for PlayFab Multiplayer Servers 2.0 - PlayFab | Microsoft Docs to learn about the billing of PlayFab Multiplayer Servers and check this documentation - Integrating with PlayFab Multiplayer Servers - PlayFab | Microsoft Docs to learn about how to integrate PlayFab Multiplayer Servers with PlayFab Matching Making Service.

If you still would like to host multiple matches on one server instance and implement the autoscaling of the server instances. You would need to create an external Matchmaker server to manage the matches and server instances programmatically. For such advanced requirements, you can refer to the lobby server solution mentioned in this blog - Building Lobbies with Azure PlayFab to implement your own match management server.

2 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.

karan Sharma avatar image karan Sharma commented ·

thing is my game is quite simple and can even host 100 matches(see how simple it is)...
With every new server instance there is a overhead which I want to avoid that's why I want at least to host 10 matches in a single instance.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang karan Sharma commented ·

If so, as the above answer said, you can consider hosting additional management servers externally to allocate rooms for matches on your own, instead of using the integration of server allocation and matchmaking provided by PlayFab.

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.