Discover how Edgegap works

Discover how Edgegap works

What Are Relays Servers for Multiplayer Games? A Peer-to-Peer Networking Guide

Published

Published

Published

Last updated

Last updated

Last updated

Key Insights

Key Insights

Key Insights

  • Relays solve connectivity: they get packets through NAT and firewalls and hide player IP addresses, but they run no game logic.

  • The host still owns the match: behind a relay, one player's machine keeps authority, a zero-latency advantage and the power to end the session by leaving.

  • Safer than raw P2P, not safe: a relay blocks IP-based attacks between players, but it can't stop a host from altering the match.

  • Free relays come with someone else's routing: a 2026 Steam Networking regression pushed players in several regions onto distant relays for about three months.

  • Dedicated servers come in relay-sized versions: a relay-style or multi-room server keeps authority off player machines at a cost close to a relay's.

Most players never see a relay server, but plenty of multiplayer games depend on one. A relay is what lets two players behind home routers, mobile networks or strict firewalls end up in the same match.

This guide covers what relays do, what they don't, what free relay services from Steam, Epic Online Services and Unity look like in production, and when a game is better served by a dedicated server. For the full comparison of networking models, see Edgegap's guide to authoritative servers, relays and peer-to-peer.

What Is a Relay Server in Multiplayer Games?

A relay server forwards traffic between players who can't reach each other directly. Edgegap's glossary puts the limit plainly: it "runs no game logic, so the game is still player-hosted peer-to-peer."

That makes a relay a networking tool, not a game server. It solves two problems. Players who can't connect directly because of NAT or a firewall can now connect. And nobody learns anyone else's IP address.

Michal Buras, then Lead Network Engineer at Highwire Games, described the privacy side in his September 2024 talk at Live Service Game Summit: "Your private address is not shared with anyone except the server which relays the information between you and the other player."

The cost is an extra hop. "A relay server adds an extra node to your game packet that it has to pass through, which introduces latency," Buras explained. A relay can still beat the direct route when its network is faster than the public internet path. Valve says its relay network "in many cases improves ping times and connection quality." Whether that happens for a given player depends on where the nearest relay is.

How Does Peer-to-Peer Networking Work?

In most peer-to-peer games, one player's machine acts as the server. Unity's Relay documentation describes the setup: "you can use Unity Relay to initiate a connection between multiple clients and a host." The host runs the match, and everyone else connects to it.

That design avoids server costs, since players supply the hardware. It also makes the host's connection, hardware and honesty part of every match. If the host leaves, the session ends unless the game supports host migration.

Getting players connected in the first place is the hard part. Most players sit behind NAT, which blocks unsolicited inbound connections, and console makers maintain support pages just to explain NAT types. When a direct connection can't be made, the traffic needs a relay.

What Do Relays Solve, and What Don't They?

A relay changes the path traffic takes. It doesn't change who runs the game. The glossary describes the consequence for latency: the host plays with no network delay, while "every other player's traffic takes two hops through the relay."

Relays: Genres, Games, Benefits and Drawbacks

  • Key game genres: player-hosted co-op and casual games whose players sit behind NAT or firewalls, and crossplay sessions across platform networks.

  • Examples of games using relays: Among Us, which "always uses relay servers," according to Innersloth's lead developer; TEKKEN 8, built on Diarkis networking middleware; Street Fighter 6, Deep Rock Galactic and Warhammer: Vermintide 2, which fall back to Steam Datagram Relay when a direct connection isn't available (GameNetworkingSockets issue #398); and Valheim servers started in crossplay mode, where, per Iron Gate's server guide, "the server transmits data via a relay server and therefore does not require Port Forwarding."

  • Key benefits: NAT and firewall traversal, hidden player IP addresses, protection from denial-of-service attacks between players, and fast integration with no server build.

  • Main drawbacks: an extra network hop, no validation of gameplay, the host's latency advantage and hardware limits remain, host migration is still needed, and routing depends on where the relay provider has locations.

Among Us also shows where the category ends. Its lead developer explained in 2020 that its relay servers "are partially authoritative so I can avoid expensive physics calcs on the servers (allowing me to scale cheaper) but still handle most hacks, host migration, etc." A relay that checks the game is doing a server's job.

Do Relays Stop Cheating?

No. They narrow the exposure compared with raw peer-to-peer, and that's where the benefit ends.

The gain is real on one front. Players can't see each other's IP addresses, so they can't target the people they're matched with using denial-of-service attacks.

The match itself is still player-hosted. The host owns the game state and can alter it through memory editing, lag switching or false match results, with or without a relay in the path. The authoritative logic also ships inside the game build every player downloads. Anyone can decompile that build to learn how the host validates the match, then modify it. A relay never sees any of this. It only forwards packets.

Data around the session can leak too. Buras showed lobby data on a released title being read with a common debugging tool: "Using a simple application called Fiddler, you can access this lobby information store and expose all the other player's private information in plain text." His verdict: "this is a massive amount of risk for a commercial game to bear."

Adding checks to the relay doesn't change the category. "If you're computing, it's not a relay server anymore," Buras said. "It becomes a form of a dedicated server."

Are Relay Services Free?

Several platforms include relays at no charge. Valve offers Steam Datagram Relay through Steamworks, and Epic Online Services, which Epic describes as "the free, modular suite," includes peer-to-peer networking with relays.

Free doesn't mean under your control. The studio doesn't choose where relays sit, how players are routed or when routing bugs get fixed. Buras flagged the location problem: "Given the limited number of relays, player might be routed to distant ones based on availability at the moment."

Host migration is the other cost that doesn't show up on an invoice. As Buras put it, "while the upfront of relays were cheap, the host migration solution you have to build becomes extremely expensive." His full breakdown is in Edgegap's recap of the talk.

What a Fallback to Relays Looks Like in Production

Those first two points are easy to nod along to in the abstract. A 2026 incident on Steam Networking made them concrete.

Starting around mid-March 2026, players began reporting that peer-to-peer matches had gotten dramatically worse. In Street Fighter 6, Israeli players connecting PC to PC saw pings of roughly 120 ms, while European players on the same title saw 60 to 80 ms. The same Israeli players connecting to a PlayStation 5 through cross-play saw a ping of 5 to 10 ms.

The players' connections were not the problem. Steam's "Share IP Address" setting was not being honored, so attempts at a direct connection silently fell back to Steam Datagram Relay, and the nearest relay was not close enough to make up the difference. The pattern held across Warhammer: Vermintide 2, Deep Rock Galactic, Melty Blood and others, with reports coming from Israel, Egypt, and China. One regression in a shared networking layer, felt in every game that depended on it.

The routing behavior itself was deliberate. Valve's own peer-to-peer documentation notes that on Steam they often do not share IP addresses between untrusted peers, so that malicious players cannot launch DoS attacks. That is a sound reason to prefer a relay. It also means the relay path has to be fast everywhere your players are, because it is the path players will get.

The part worth sitting with is what studios could do about it. Very little. Capcom could not patch its way out, because the routing decision was not Capcom's to make. Players improvised, first with a community mod and then by manually copying steamwebrtc64.dll into their game folders, a workaround that only worked when both players did it. Valve confirmed the bug on GitHub, shipped a fix in a Steam client beta, and then in the main client. Roughly three months passed between the first report and the shipped fix (GameNetworkingSockets issue #398).

Free relays are not free of consequences. They come with someone else's routing decisions, on someone else's timeline, measured against someone else's map of where players actually live. That last part is the one studios underestimate, and it is why coverage density matters more than any single benchmark. For more on that, read our take on why the only real answer to latency is more locations.

Are Unity Game Relays Free?

The answer used to be "no, and it scales with usage." As of 2026 the question has changed, because Unity no longer offers game server hosting at all.

Multiplay Game Server Hosting was deprecated on April 1, 2026, following a migration deadline of March 31. Unity's own service notice puts it plainly: "As of April 1st 2026 Multiplay Game Server Hosting by Unity has been deprecated. Customers can no longer scale new game servers or make new allocations to the Multiplay service." Studios that declared an intent to migrate to Multiplay by Rocket Science before the cutoff were allowed to keep running during their transition.

Relays did not go away with it. Unity Relay, along with Lobby, Friends, and Vivox, remains part of Unity Gaming Services. Per Unity's pricing page, Relay is priced on concurrent users and bandwidth, with a free tier of 50 average monthly CCU. Studios with large player bases or heavy network traffic should model what it costs at scale.

That combination leaves a Unity studio in an unusual spot. The relay is still there. The authoritative hosting is not. Teams that had planned to start on Relay and move to Multiplay once their game got competitive now have to choose a hosting partner regardless, and they are choosing it under a deadline rather than on their own schedule.

Relays for WebGL and Browser Games

Browser games have fewer networking options than native ones. A game built on WebSockets can't connect players to each other directly, so every match runs through a server. A game built on WebRTC can attempt a direct connection and falls back to a relay when it fails.

That relay has a specific name. STUN servers help a browser discover its public address, but they don't carry game traffic. TURN servers (RFC 8656) do the relaying.

For browser games, the relay is often the default path rather than the fallback. Its placement sets the latency floor for every match, and the host-authority limits above still apply. A browser game that needs fair, validated matches is already routing everything through a server, so making that server authoritative is a smaller step than it is for a native peer-to-peer game.

Upgrading from Relay: Authoritative Game Servers?

A relay changes who your traffic flows through. It does not change who decides what is true. Almost every remaining limitation of a relay setup traces back to that one distinction.

  • The cheats from earlier still work. Game state lives on a player's machine, so memory editing, lag switching and false results are all still on the table. A relay hides IP addresses and solves NAT. It does not validate a single packet of gameplay.

  • Every packet takes two hops. Traffic goes player to relay to player, rather than player to server. The relay's placement sets the latency floor for the entire match, and no netcode trick recovers what a badly placed relay adds.

  • The host is still a single point of failure. When the hosting player quits, crashes, or rage-closes the game, the match either dies or limps through a host migration. Neither reads well in a ranked mode.

  • The host's hardware caps the game. Simulation tickrate, entity counts, player counts, and bandwidth ceiling are all decided by whichever player got picked, on whatever connection they happen to have.

  • There is no server side to build on. No authoritative validation, no persistence between matches, no server-owned telemetry, no replays, no controlled tickrate. Systems that competitive games are expected to ship with have nowhere to live.

Game server hosting is the answer to that list. It refers to providing online infrastructure for multiplayer games, including dedicated servers that run the match on a machine no player controls. Hosting can be managed by game developers themselves, or by third-party companies.

Hosting shapes everything from latency to matchmaking. As multiplayer becomes more central to more games, its quality, reliability and scalability matter to developers and players alike.

It also puts the routing decision back in the studio's hands. When a region suddenly sees 120 ms, the team that owns the deployment is the team that can fix it, rather than filing a report and waiting on someone else's client update.

The historical objection to all of this was cost and operational overhead. Running dedicated servers meant provisioning capacity you paid for whether players showed up or not, and hiring the DevOps skills to keep it standing. That is the calculus that pushed a generation of studios toward P2P and free relays in the first place, and it is the part that has changed most. Just-in-time orchestration boots a server on demand in roughly 3 seconds, across 615+ locations worldwide, at a single price regardless of region. One AAA studio measured a 58% average latency reduction after moving to that model, with sub-50ms latency reaching 78% of its playerbase (AAA studio case study).

Which reframes the comparison. A relay's appeal was never that it produced better matches. It was that it was cheap and easy while dedicated servers were neither.

Which Option Fits Your Game?

A dedicated server doesn't have to run a full simulation. Edgegap's dedicated server glossary describes four scopes, each costing more CPU per player than the one before.

Dedicated server scope

What the server does

Typical fit

Relay-style

Forwards messages between players and checks a handful of rules

Co-op and casual sessions that need a neutral host instead of a player's machine

Result referee

Clients simulate; the server validates outcomes such as scores, inventory changes and purchases

Games with an economy or progression but light real-time simulation

Multi-room

One process hosts many small sessions side by side

Card, turn-based and casual games with many small lobbies

Full simulation

Runs the whole game loop for every player

Shooters, sports, battle royales, competitive and ranked modes

A relay-style or multi-room server can run on a fraction of a vCPU, which brings its cost close to a relay's while keeping authority off player machines. That's the default worth starting from.

A peer-to-peer game behind a relay still fits a narrow set of cases: friends-only sessions with no ranked mode, no in-game economy and no strangers in the lobby, and deterministic lockstep games where every peer already runs the full simulation.

Conclusion

Relays have a real job. They fix NAT, they hide IP addresses, and they are quick to integrate. For a friends-only co-op game or an early prototype, that can be enough.

What a relay can't do is own the game. Once competitive integrity, an economy, persistence or consistent performance across regions matters, the question stops being how traffic is routed and becomes where the simulation runs. The 2026 Steam incident showed the other half of that trade: when the route belongs to someone else, so does the fix.

—

This article cites the works listed in Sources. All rights in the original content are owned by their respective owners.

Sources

Written by

Mathieu Duperré (CEO) and Jakub Motyl (Product)

More on this topic:
More on this topic:
More on this topic:

Get your Game Online Easily & in Minutes

Start Integrating Now!

Get your Game Online Easily
& in Minutes

Get your Game Online Easily & in Minutes