Host Migration in Peer-to-Peer or Relay-based Multiplayer Games
“Host migration failed” is an unfortunately common sight in peer-to-peer or relay-based multiplayer games, with the issue widespread enough that “How to fix host migration in Warframe” trended on Google Search, and the same for the world’s most popular FPS shooter - “Call of Duty Host Migration”.
Quite simply, host migration is an underlying foundation of peer-to-peer (P2P) networking or relays as one of the players in a match mandatorily needs to act as the “server” in a multiplayer game, namely the “host”. Should that player quit, another player must become the server (or “host”), otherwise the game ends and all players are kicked out.
This article will explore what host migration is, why it is a challenge for multiplayer games development, and the solutions available to game developers.
What is Host Migration in Multiplayer Games?
As mentioned, host migration occurs when a player who is acting as the host of a multiplayer game session leaves, forcing the game to reassign the host role to another player without disrupting the session.
Now, integrating host migration should simple, but in practice, it's a significant technical challenge, especially in peer-to-peer (P2P) games.
In P2P networking, one of the players acts as the host, handling game logic and communications for all connected players. If this host leaves the game, the session collapses unless a new host is appointed. Transitioning this responsibility, while keeping the game stable, is called host migration. As simple as this process may seem, it can be a nightmare for developers and a poor experience for players.
Why Host Migration is a Deal Breaker for P2P Networking
As mentioned by Michal Buras, Lead Networking Engineer at Highwire Games on Six Days in Fallujah during a conference at LSGS London, this is a massive problem of peer-to-peer-based networking, as “if the player who is hosting the game exits, everyone gets disconnected. It's a fundamental issue you need to figure out because it literally kills the game session end to end,". This issue isn't just theoretical; players can face abrupt disconnections, which are a dealbreaker for any commercial multiplayer game.
Host migration poses several problems for game developers, including:
Unpredictable Disconnections: When the host leaves, players can experience temporary or permanent disconnections, causing frustration.
Increased Development Complexity: Implementing host migration requires considerable effort. It may demand a full refactor of a game’s network code and integration with third-party solutions.
Bandwidth Costs and Latency Issues: Even when the migration works, it often leads to a network bandwidth overhead. This is especially problematic for fast-paced games where any latency can ruin the user experience.
Why are Game Developers using Peer-To-Peer Then?
Now, it’s good to know why game developers use Peer-to-peer (P2P) networking in the first place. P2P has been a popular choice for multiplayer game developers, particularly in the early stages of development or for smaller projects. The main reasons are:
Cost Efficiency: P2P networking eliminates the need for expensive server infrastructure. Players themselves host the game sessions, reducing upfront operational costs.
Simplicity for Small Games: For simpler games with fewer players, P2P can be easier to implement and manage, as it doesn't require complex server setups.
For more details, check out our article on P2P – titled “What is Peer-to-Peer Networking for Multiplayer Games?”.
What is the cost of adding Host Migration
Now on to the main topic – what is the cost of adding Host Migration?
As mentioned by Michal during the conference at LSGS London, the cost in time and development resources is massive – “[in Unreal Engine], the whole project required full refactor in order for all the features to support it. [In other words], each small feature, each designer made blueprint had to be reworked, and there is no silver bullet for implementing host migration, unless your engine natively supports it, but this will come with a network bandwidth cost.”
For Tripwire, it was " too much of a project management risk for too little to gain in comparison to other alternatives. The takeaway being, while the upfront cost of [peer-to-peer] relays were cheap, the host migration solution you have to build becomes extremely expensive. Not so cheap after all.”
In other words, the initial cost savings of a P2P or relay solution quickly evaporate when considering the engineering hours required to build and maintain a reliable host migration system.
Why Authoritative Servers Are the Ideal Solution for Commercial Multiplayer Games
Given the challenges associated with host migration in P2P systems, more developers are turning to authoritative servers. These are central servers that handle all the game logic, ensuring stability, fairness, and uninterrupted gameplay.
Authoritative servers eliminate the need for host migration altogether since the server—rather than a player—hosts the game session. No player leaving or disconnecting will disrupt the game. This approach ensures a seamless experience for players and simplifies the development process.
Moreover, services like Edgegap go one step further by orchestrating these authoritative servers dynamically at minimal costs. By distributing game sessions across geographically optimized servers, they reduce latency and ensure an even better user experience. They also handle the complex infrastructure management, leaving developers free to focus on creating their games and not infrastructure for their game.
Conclusion
Host migration is a critical challenge in multiplayer game development, particularly for games relying on P2P networking or relays.
While these models may seem cheaper upfront, the complexity and costs associated with building a reliable host migration system can quickly outweigh the initial savings.
Authoritative servers, combined with orchestration services like Edgegap, offer a better, more reliable alternative, providing developers with the tools to create stable, low-latency, and seamless multiplayer experiences. In the end, avoiding host migration issues can be the difference between a game’s success or failure.
---
For more information on the comparison between Peer-to-Peer Networking, Relays and Authoritative Severs (often called Dedicated Servers), check out our dedicated breakdown on our blog.
---
The information above comes from a presentation done by Michal Buras, Senior Developer at Highwire Games, at the Live Service Game Summit conference.
A full version of this conference can be found here: Peer-to-Peer, Relays & Container Instances: And In-Depth Analysis of Development Resources, Performance, Security Issues for Multiplayer Games
Written by
the Edgegap Team
Sources and/or content collaboration with
Michal Buras, Lead Networking Engineer at Highwire Games