question

Bijian Wu avatar image
Bijian Wu asked

Player Connect to different region servers

I am using PlayFab multiplayer server and playfab matchmaking.

I would like to know if I have multiple servers in different region, and how does player side know which region they should connect to? does it been done automatically? or I have to do it manually? if so, how?

also, let's say I have North Euro server and West Euro server, if North Euro server is having too much player, how would I assign new player to West Euro server then?

Thanks in advance for any replies

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

·
Rick Chen avatar image
Rick Chen answered

Players can connect to the region with lower latency and they can use Quality-of-Service (QoS) beacons to measure the latency to Azure. The clients measure the latency to your regions on their side, then submit the latency with CreateMatchmakingTicket API. If your matchmaking queue has enabled server allocation, the queue will find the available server with lower latency for the players. After the ticket is matched, the player can obtain the server’s info with GetMatch API.

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.

Bijian Wu avatar image Bijian Wu commented ·

Can you share some Code Snipptes on how this is done in Unity?

0 Likes 0 ·
Rick Chen avatar image Rick Chen ♦ Bijian Wu commented ·

We don’t have the unity sample of using QoS. But there is a QoS APIs available in the C# SDK, it uses the ListQoSServersForTitle API to get the QoS beacons, then uses a list of RegionPinger to ping each region to get the latency of each region. Please refer to: https://github.com/PlayFab/CSharpSDK/blob/master/PlayFabSDK/source/Qos/PlayFabQosApi.cs

You could try implementing this logic in your Unity project.

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.