Relay server host migration

Hello all,
I am pretty new to the Unity gaming services and have been experimenting with the multiplayer Relay server functionalities. However, terminated game sessions when the host leaves will be problematic for my planned project. I know that the Lobby has Host migration options, but is there a way to keep the relay server with the game session running even after the host leaves?

1 Like

Hey @Mitrandir-main

I was trying to find solution to the same problem. I had the same issue and decided to move to NGO + photon.
I think all dev’s in unity have assumption, that there is one and only Server connected and if it’s gone, then everything is gone as well. They obviously haven’t thought much about 1v1 games for example.

You have only one option - create new relay service connection by some of players in lobby (host of lobby doesn’t need to match host of Relay) and provide connection details via Lobby again. I also had problems of understanding of cooperation between Relay and Lobby - Relay and Lobby integration

IMHO keeping Relay room would be much better and easier. And using lobby for switching host creates a huge lag. Operation which could be basically instant will take at least couple of seconds. There is rate limiting for Lobby plus creating new Relay allocation takes some time as well.

Moreover I’ve found out some other problems with Relay service.

  • it has almost 10s server timeout - so if client A will lost internet connection, client B will now it in 10 seconds (photon can recognize this in 1 or 2s)
  • And if player A disconnects and he is host. Player A will get information that player B disconnected. I think this is connected with the concept how Unity handles Relay, which does not have any authority and whole authority is on host (even the authority of being online).

Tagging @simon-lemay-unity for help :slight_smile: