Relay Server
A relay server forwards network traffic between players without running any game logic — it solves NAT traversal and connectivity problems but does not make your game authoritative or cheat-resistant.
In a peer-to-peer game, players connect directly to each other. This works in theory but breaks in practice because most players sit behind NAT (network address translation) routers that block unsolicited incoming connections. A relay server acts as a neutral middleman: instead of connecting directly, both players connect to the relay, and the relay forwards their packets to each other.
The game logic still runs on the players’ machines. The relay just moves bytes — it has no idea what those bytes mean.
Relay vs. dedicated server
This is the most important distinction to understand when choosing your multiplayer infrastructure:
| Relay server | Dedicated server | |
|---|---|---|
| Runs game logic | No | Yes |
| Authoritative | No | Yes |
| Cheat-resistant | No | Yes |
| Solves NAT | Yes | Yes |
| Cost | Low | Higher |
| Latency | Adds a hop | Can be lower (geographically placed) |
A relay is not a substitute for a dedicated server — it’s a different tool for a different problem. Relays help P2P games connect. Dedicated servers replace P2P entirely.
When to use a relay
Relays make sense for:
- Casual or co-op games where cheating is not a concern and the engineering cost of dedicated servers is hard to justify
- Early prototypes where you want real players to test connectivity before investing in server infrastructure
- Fallback connectivity — some architectures use dedicated servers as the primary path but fall back to relay when direct connection fails
Unity Relay, Photon, and Steam Networking Sockets all offer relay services. They are fast to integrate and have no per-session compute cost beyond bandwidth.
When you’ve outgrown a relay
If your game is competitive, ranked, or large-scale, relays stop being sufficient:
- Players can still manipulate their own client state (the relay just forwards it)
- One player’s poor connection degrades everyone’s experience (no server to buffer against it)
- You have no server-side logs, no session replay, no telemetry
At that point you need a dedicated authoritative server — a separate machine running your game logic, managing session state, and acting as the single source of truth. That’s the infrastructure Gameye provides.
See also: Dedicated server · Peer-to-peer architecture · Authoritative server · Latency · How Gameye orchestrates dedicated servers globally