Greetings.
I'm want to create matchmaking system, where players get list of suitable servers and join them. But some server can be "dead" for some reasons.
Each "alife" matchmaking server send heartbeat state every 10 seconds by RefreshServerInstanceHeartbeat method. If i'm got it correctly from related topics, when i'm send GetCurrentGameRequest method, i'm get list of active games with some heartbeat delay (about 2 minutes). But when i'm called it, i'm recieve all my game servers, even dead.
My game's title id is 59DD.
Answer by Brendan · Aug 28, 2017 at 05:51 PM
It sounds like you're saying that you have a set of externally hosted servers which may or may not be allowing players to join, and you're using https://api.playfab.com/documentation/client/method/GetCurrentGames to get the list of all available servers, for purposes of matchmaking.
What RefreshServerInstanceHeartbeat does is to let our matchmaker know that your server is still active, and so available for matchmaking (it is initially added to the list the matchmaker maintains when you call https://api.playfab.com/documentation/server/method/RegisterGame.
If you want the games to not be returned in the list of session the matchmaker is tracking, the simplest thing to do would be to use https://api.playfab.com/documentation/server/method/DeregisterGame to remove it from the list.
Thanks for advice, but "Deregister game" method is not for my case.
There is possibility than my server can crash,or can be closed by system, and "Deregister Game" just can't execute, but server can still be returned in servers list. I wan't to prevent this issue.
So, as i get it correctly, i can't exclude "dead" servers with "heartbeat" option?
We maintain a list of active servers in the matchmaker. When you register a server, and when it calls the heartbeat API, that tells us to make sure to keep the server in that list. It's not an active socket connection. So when your server goes "dead", if there's no way for it to notify us via the deregister API call, it will be removed from the list when it misses the time limit for the heartbeat call, which is two minutes.
Seems pretty logical, but my instances then i'm launch yesterday still returns in via GetCurrentGames method. Is there any mistmatch than i'm didn't noticed?
Otherwise, is there any opportunity to reduce 2 minutes timeout?
Does calling PlayFabMatchmakerAPI.StartGame without any available servers return a failure callback? 2 Answers
What does the matchmaker ticket "WaitingForServer" mean? (Matchmaking 2.0) 3 Answers
Match 2-4 players together 1 Answer
getting started multiplayer on Nintendo Switch with UE4 2 Answers
How to define attribute path for Matchmaking Rule with Player Entity 1 Answer