Discover how Edgegap works

Discover how Edgegap works

Relay Server

A relay server forwards traffic between players who cannot reach each other directly, for example when NATs or firewalls block the connection. It fixes connectivity and hides players' IP addresses, but it runs no game logic, so the game is still player-hosted peer-to-peer: one player's machine owns the match. That player can cheat more easily and plays with no network delay, while every other player's traffic takes two hops through the relay. If the host leaves, the match ends unless the game supports host migration.

Also called

relay

By

By

By

Philip Coté

Philip Coté

Philip Coté

,

CTO

CTO

CTO

Published

Published

Published

How Does a Relay Server Route a Match?

In a host-client game, one player's machine runs the match and everyone else connects to it. Home routers and firewalls often block that connection. A relay gets around it: the host and every guest connect out to the relay, which passes packets between them.

That puts the relay on every guest's path. A guest's input travels guest to relay to host, and the host's update comes back the same way. The host's own input never leaves its machine.

  • Latency depends on where the relay is. A relay close to the line between a guest and the host adds little. A distant one adds its distance to every packet, in both directions.

  • Fairness depends on it too. Guests far from any relay location play with more delay than guests near one, and every guest plays with more delay than the host. The fewer locations a relay network has, the more players end up far from one.

Some games relay every match. Browser games built on WebSockets cannot connect player to player at all, and WebRTC falls back to a relay, called a TURN server, whenever a direct connection fails.

Article's 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.

What Does a Relay Fix, and What Does It Leave?

A relay does no computing. It forwards packets without acting on them, so it can change how traffic travels but never which machine decides what happened. In networking terms, the game is still player-hosted peer-to-peer.

Problem

With a relay

Connections blocked by NAT or firewalls

Solved

Players seeing each other's IP addresses

Narrowed: the relay hides them, but other session data can still leak (see "Are Free Relay Servers Really Free?")

Host cheating: editing values, lag-switching, reporting false results

Unchanged

The host's latency advantage

Unchanged

Match limited by the host's upload and hardware

Unchanged

Match ending when the host leaves

Unchanged, unless the game builds host migration

The first two rows are network problems, and a relay is a network fix. The other four come from where the match runs.

Are Free Relay Servers Really Free?

What a free relay costs is control over the route.

Michal Buras of Highwire Games evaluated relay options for Six Days in Fallujah. On Epic Online Services' free relays, he found "absolutely no control over how those players are routed": with a limited number of relays, players can be sent to distant ones depending on availability. He also showed lobby data in a released game on that setup read in plain text with a common debugging tool, exposing other players' private information (Live Service Game Summit talk, September 2024).

A shared relay network also fails for every game at once. In March 2026, a Steam client change sent peer-to-peer matches that should have connected directly through Valve's relays instead. Israeli players reported about 120 ms against each other, against 60 to 80 ms with Europeans, in games including Street Fighter 6 (GameNetworkingSockets issue #398). Valve shipped the fix in the Steam client on 10 June 2026. No studio could change the route in the meantime.

Relay Server vs Dedicated Server: When Is a Relay Enough?

A relay is enough when the trade-offs in Part 2 are acceptable: co-op among friends, small private sessions, or a game already built as a listen server that cannot move.

It stops being enough when the team wants the server to check anything. Buras reached that point when his team considered a relay that would inspect packets to stop cheating: "If you're computing, it's not a relay server anymore. It becomes a form of a dedicated server."

That server no longer has to cost what dedicated servers used to. A relay-like dedicated server, small or multi-room with many matches in one process, takes over the host's role at close to a relay's cost (host migration covers the options). The host's logic can usually run as a headless build.

A word from our sponsor (ourselves!)

Most lag comes from distance, not from code. Edgegap's Edge Cloud is a distributed network with up to 615+ locations available on demand, so each match runs at the best available location for its players. Independent replays of live studio traffic measured a 58% drop in average round-trip time compared with public cloud.

Edgegap's Take (just our opinion, take it with a grain of salt!)

Relays as a Price, not an Architecture

Teams have usually picked relays because dedicated servers cost more, rarely because a relay makes a better match. A relay-like or multi-room dedicated server can cost close to what a relay does, and it holds the match. The pricing calculator compares it for your game.

The latency points the same way. Independent replays of a studio's live traffic measured a 58% average latency reduction for dedicated server placement against public-cloud relay placement (platform data, 18 September 2026).

A useful check: if the relay plan already includes host migration or anti-cheat, the team is likely building a dedicated server anyway, and likely the hardest way.

-

-

-

Philip Coté

Philip Coté

Philip Coté

,

CTO

CTO

CTO

Frequently Asked Questions

What is the difference between a relay server and a proxy server?

What is Steam's relay server?

What is a TURN server?

How much does a relay server cost?

Get your Game Online Easily & in Minutes

Start Integrating Now!

Get your Game Online Easily
& in Minutes