question

Edward Richardson avatar image
Edward Richardson asked

Behaviour of grouped network messages in parties

I'm curious about a particular aspect of how network messages function in parties. Recently support was added for allowing direct connections on PC, and the documentation on that noted that direct connections use more upstream bandwidth on a user for voice chat.

This got me wondering how network messages act between direct and relayed connections. Each call to SendMessage allows for the ability to add multiple endpoints to the message, so how does this act exactly in terms of upstream? If a single SendMessage call sends a message out to all other endpoints in a network, and all endpoints are on the relay, does the sender send only one packet to the relay which then gets split out, or does it send out multiple packets for every endpoint in the list, even if it's an identical message to the same relay?

The ultimate question being, if I designed the game's underlying netcode to transmit game updates as grouped messages to all endpoints instead of individually, would it actually save upstream bandwidth on the player assuming they are connected to the relay?

In addition, how would this act if the player had a mix of direct and relayed connections (say between PC and other platforms)?

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

·
Citrus Yan avatar image
Citrus Yan answered

Messages are duplicated and sent to each target device by Party when using peer-to-peer connections, and, for those devices that are connected to the cloud relay, Party sends a single message to the service; the service then replicates and forwards the message to each target device. Please check out this section in the doc for more details : https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/networking/concepts-direct-peer-connectivity#upstream-bandwidth-considerations. In general, peer-to-peer connections have lower latencies and higher upstream usage while the cloud relay has a relatively higher latency and lower upstream usage.

And, for the mix of direct and relayed connections scenario, for devices that are able to establish peer-to-peer connections with, endpoint messages and chat data between those devices will be transmitted using those direct connections. For other devices that are unable to establish peer-to-peer connections with, all communication between those devices will be transmitted via transparent cloud relay servers instead.

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.