question

Cameron avatar image
Cameron asked

CUstom Game Servers: Multiple matches / games on a single instance / container.

My multiplayer design has the following requirements:

  • Authoritative server (players only aware of own state)
  • 3 to 6 players per game, average of 4. Synchronous turn based.
  • Each player makes a single choice every 60 second turn (one 32 bit int).
  • Each player receives <1k state data at turn end.
  • A single game session will last 10 to 20 turns.
  • Minimal memory use per match/game (<4mb)
  • Minor CPU processing done at turn start (<2ms on 4ghz CPU).
  • Players can emote and text chat (individual or all players in match)

As the CPU and memory overheads per game sessions are so low I want to have multiple game sessions per instance/container. From reading the forums it looks like I can do this using the legacy multiplayer system (I saw mentsion of one t2 instance running multiple sessions) but using something that's already legacy for a new title makes me feel very uneasy and I'm not sure where the documentation for this can be found.

The new Multiplayer 2.0 stuff looks great, and I really love the new matchmaking system, but from the documentation and poking around the GSDK repo it looks like multiple sessions/matches per instance / container is not a supported use case? I've tried to find information about the overheads of windows containers but none of the material available online presents an analysis of the scenario here - everything focuses on containers vs vm instances and I've personally only ever used containers for standing up typical web microservices, never done any performance analysis.

I feel like one container per game session would be overkill for my use case as my server is c# .and loading the .NET framework into memory for each container (plus whatever other overheads the container has) seems very wasteful.

I already have a server that manages multiple matches in a single instance - refactoring to one-match-per-instance would be trivial though. What I don't have is matchmaking or scaling beyond a single instance which is why I'm evaluating playfab.

I'm looking for some advice on best practice and weather or not multiplayer 2.0 is going to support these kinds of games efficiently in the future.

Custom Game Servers
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

About the legacy multiplayer server. It's inconvenient to use it in a new title. And as Andy said in this thread. "We actually don't have many games go live on t2, as far as I'm aware. The CPU burst model doesn't lend itself very well to game servers in many cases. I generally advise moving to a different VM type (C4.large is common) where you get a known stable resource allocation" So we advice trying our new Multiplayer Server 2.0 in your new title, it's more capable.

At the present stage, PlayFab doesn't provide a feature of matching multiple matches per instance. Multiplayer Server2.0 will continue to have new features added in the future. Or you can add a feature request of matching multiple matches per instance in the forum.

And now, you already have a custom server, so you can integrate GSDK and our exiting matchmaking feature with your custom server. You just need to assign these matches in one instance manually instead of assigning them through PlayFab directly, it's also supported. You can check the doc Matchmaking tutorials for more details.

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.

Cameron avatar image Cameron commented ·

Legacy only scales vertically? That's a pity. Looks like neither solution is really what I'm after.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Cameron commented ·

Multiplayer Server2.0 will continue to have new features added in the future. You can follow our blog.

0 Likes 0 ·
Daniel avatar image
Daniel answered

>You just need to assign these matches in one instance manually instead of assigning them through PlayFab directly, it's also supported

With this multiplayer 2.0 I see the big problem is with short (quick) game sessions for small amounts of players (< 10).

10 |1200

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

Pego avatar image
Pego answered

"You just need to assign these matches in one instance manually instead of assigning them through PlayFab directly, it's also supported"

I can't find how to do that in the doc, could so specify how to make this work with Multiplayer 2.0 ?

thanks a lot

,

"You just need to assign these matches in one instance manually instead of assigning them through PlayFab directly, it's also supported"

I can't find how to do that in the doc, could so specify how to make this work with Multiplayer 2.0 ?
thanks a lot

10 |1200

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

brian-8 avatar image
brian-8 answered

@Pego did you ever find an answer to this? I have the exact requirements. I have a multi match game server since it scales way better and mine is just to provide server authoritative control.

10 |1200

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

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.