Host migration

Host migration is the act of transferring the Relay host role from one player to another.

Relay doesn't have any method to migrate the host role when a host player disconnects from the Relay server. If the host player disconnects from the Relay server, Relay ends the host player’s allocation and disconnects the remaining players.

However, you can add custom logic to your game to migrate the Relay host role to another player if the original host player disconnects. The logic might include a workflow similar to the following:

  1. Detect if the host player disconnects prematurely.
  2. Place the remaining players in a lobby.
  3. Select one of the remaining players to fill the host role.
  4. Start a new Relay allocation.

Note: Also see Lobby host migration.