Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by b · Mar 29 at 01:31 AM ·

RequestMultiplayerServer - NoHostsAvailableInRegion and backfill tickets

I am new to working with playfab and I uploaded my first server.exe (created with unity) and it works.
Now I noticed that the first player-client can search for an available server using RequestMultiplayerServer.

But this will already return NoHostsAvailableInRegion for the next player that tries to connect.
What I read from this forum suggest that I need to create a backfill ticket so the server will wait for more players. Is that the right way to do it?

I am asking because for me this workflow seems strange.
Because every game will have more than one player so I wonder why RequestMultiplayerServer works the way it does.

Maybe I should approach the whole "how clients connect to a server" concept differently?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by b · Apr 08 at 01:52 AM

Thanks for your help.

I build my own solution which does the following

  • ping all PlayFab server locations (all regions where you uploaded your server to)
    and get the one with the best ping
  • if no server is active at that location, get one out of standby
  • if one is active, check if there is still room for some more players.
    If so connect to it. If not get another server out of standby


I wrote a guide for other people who might search for a solution for unity 3D.

https://jarc.xida.net/2021/04/06/playfab-multiplayer/

Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Rick Chen · 5 days ago 0
Share

I am glad that you have built your own solution. And thanks for your effort in writing a guide.

avatar image

Answer by Rick Chen · Mar 29 at 08:43 AM

The NoHostsAvailableInRegion error usually indicates that there is no available server for the region you are requesting. The RequestMultiplayerServer API is used to request a multiplayer server session, not joining other player’s server. How many servers have you assigned to the build?

If you would like to connect second player to the server requested by the first player, you could implement a way to share the server information (IP address, port number etc.) to the second player. Or use the backfill ticket as you mentioned, the Server backfill tickets allow a game server to search for additional players which will fit into the game currently being played, please refer to: Using server backfill tickets for more detail.

Comment
b

People who like this

1 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges