question

Banana Man avatar image
Banana Man asked

How to set a different port per server on a single VM?

Hello,

We have a question regarding Multiplayer Servers 2.0. We are looking to switch from AWS and had a question regarding how ports are set up per server process on a single VM. We are using Unreal engine and typically if we have 10 servers running on a single instance each server uses a different port (7777-7787 for example). Does the container effectively make this moot? When setting up a build through the PlayFab site I don't see a way to specify which server process will get what port.

Thanks!

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

·
JayZuo avatar image
JayZuo answered

As Multiplayer Servers 2.0 uses Docker container, each of your server instances is independent from others. So in your server, you can just listen on one port (e.g. 7777) and Docker can map this port to a port on the VM. There is no need to set a different port per server.

You do not need to worry about the port mapping or Azure network virtualization. When your allocate servers (e.g. using RequestMultiplayerServer API) you can get the proper Internet-facing IP address and port information for clients to connect. For more info, please see https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/connecting-clients-to-game-servers.

1 comment
10 |1200

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

v-humcin avatar image v-humcin ♦ commented ·

Additionally, if each server needed to open multiple ports you could still do that and they would be mapped in the same way.

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.