question

Bijian Wu avatar image
Bijian Wu asked

NETWORK setting when Creating server build

untitled1111.pngWhen creating a new multiplayer build, what port should I put in the Network section? do i need both TCP and UDP port? can they be in the same port?

Also, when I trying to Increase the Servers per machine to be number like 80 or 100, it starts complains about ports, and throws an error Error - Number of ports on a VM cannot exceed 60. Reduce value specified for SessionHostCountPerVm.

untitled.png

multiplayer
untitled.png (53.3 KiB)
untitled1111.png (88.9 KiB)
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

>> When creating a new multiplayer build, what port should I put in the Network section? do i need both TCP and UDP port? can they be in the same port.

You needn’t use both TCP and UDP ports. The port you set in the build configuration depends on how you listen the port in the server program. For example, the OP of this thread uses the different methods to bind the socket to ports with TCP and UDP protocols. You can choose the protocol types depends on your specific needs.

https://community.playfab.com/questions/16245/binding-socket-in-custom-server.html

They can use the same port number but need to use the different port names. You can refer to this thread for more info.

https://community.playfab.com/questions/30759/servers-20-how-to-open-a-port-to-both-tcp-and-udp.html

>> Also, when I trying to Increase the Servers per machine to be number like 80 or 100, it starts complains about ports, and throws an error Error - Number of ports on a VM cannot exceed 60.

The maximum number of ports on one VM is 60. It’s by design. You can refer to the answer in this thread -- https://community.playfab.com/questions/48826/multiplayerserverbadrequest-multiplayerserverbadre.html. If your set 2 ports in one server, the maximum number of servers per machine should be equal or less than 30.

Besides, for clarification, the remaining regional server quotaequals to available VM cores/cores per machine*server per machine. It means if the number of available VM coresis 16, and you use 8 cores VM, host 25 severs per machine. The remaining regional quota would be 16/8*25=50 servers. If your target is to increase the regional server quota, you can try to reduce the VM cores to achieve it.

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

Bijian Wu avatar image Bijian Wu commented ·

Thanks, yes, my server does need to talk between client and server via TCP and UDP so that means I have to define both TCP and UDP port in new build's Network setting?

0 Likes 0 ·
Bijian Wu avatar image Bijian Wu Bijian Wu commented ·

but if i define both TCP and UDP port, I am bound to only have 30 servers per machine maximum ?

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Bijian Wu commented ·

Yes, it's a limit of Multiplayer Servers. As the answer said, you can reduce the VM cores to increase the remaining regional quota.

0 Likes 0 ·
Sarah Zhang avatar image Sarah Zhang Bijian Wu commented ·

Yes, if you need both TCP and UDP connection, you need to define both of them.

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.