Game servers and online services¶
Scope: running dedicated game servers and the online services around them, whatever the engine: headless server builds, orchestration with Agones on Kubernetes or managed hosting on Amazon GameLift Servers, matchmaking and placement, game backends such as Nakama for player data, economy and leaderboards, releases, security, observability and cost. The guidelines cover Agones 1.62, Amazon GameLift Servers with server SDK 5.x, Nakama 3.42, Unity 6 with the Dedicated Server package 3.0, Unreal Engine 5.8 (5.9 is in preview) and Godot 4.7. Unity's Multiplay Game Server Hosting was deprecated on 1 April 2026, and Hathora shut down in May 2026. Client-server authority and netcode are in Game development (GAMEDEV-5 to GAMEDEV-9), and each engine's multiplayer rules are in Unreal Engine (UNREAL-8, UNREAL-9), Godot (GODOT-24), Unity (UNITY-CODE-12) and GameMaker (GAMEMAKER-CODE-14). Agones runs on Kubernetes, so the K8S rules apply to its clusters, store purchases follow Mobile games (MOBGAME-1), and Steam session tickets and server-set stats are in Steam and PC games (STEAM-5, STEAM-8). The general rules in Operations and reliability, Security, Authentication and OpenTelemetry apply to every game server and backend service.
Entries are sorted by score from 1 to 10 (criteria): 9โ10 start here or strongly recommended, 6โ8 recommended, 1โ5 further reading or conditional.
Adopted references¶
No single guide covers game server hosting across providers. Use the documentation of the platform you host on as its baseline.
- 8 Agones documentation: the baseline for hosting on Kubernetes: GameServers and their lifecycle, the game server SDKs, Fleets, allocation, FleetAutoscalers, fleet updates, health checking, metrics and integration patterns.
- 8 Amazon GameLift Servers Hosting Guide: the baseline for managed hosting on AWS: managed EC2 and container fleets, Anywhere fleets for your own hardware, game session placement, scaling, monitoring and security. Use the decision guide to choose a fleet type.
- 8 Nakama concepts (Heroic Labs): the baseline for an open-source game backend: accounts and authentication, the storage engine and its access controls, authoritative multiplayer, the matchmaker, leaderboards, wallets and purchase validation.
- 7 Prepare for launch with Amazon GameLift Servers hosting: the launch checklists for testing, launch day and after launch, with the items that are critical for production.
- 7 Agones best practices: separating the Agones system from game server nodes, Pod Security Standards for GameServers, and spreading game servers across clusters and fault domains, with a page for GKE.
- 7 Nakama server framework best practices (Heroic Labs): performance and scalability patterns for server runtime code, match handlers and hooks, with a launch checklist.
- 7 Amazon GameLift Servers FlexMatch: rule-based matchmaking on skill, roles and latency, either with GameLift hosting or on its own.
- 7 Cost optimization strategies (Amazon GameLift Servers): instance types, Graviton and Linux servers, Spot capacity, processes per instance, scaling to zero and data transfer.
- 7 Unity, Introduction to Dedicated Server, Unreal Engine, Setting up dedicated servers and Godot, Exporting for dedicated servers: how each engine builds a headless server.
- 6 Amazon GameLift Servers FleetIQ best practices: FleetIQ on its own, for hosting on Spot Instances in your own Amazon EC2 game server groups; it works best for session-based games with sessions under two hours.
- 6 Edgegap documentation: an alternative managed host that starts a deployment for each match at the edge, with its own matchmaker, server browser, ping beacons and DDoS protection.
- 4 Open Match 2 (Google for Games): an open-source framework for building your own matchmaker. It is a public preview, and Open Match 1 hasn't had a release since 2023, so weigh it against FlexMatch or Nakama's matchmaker.
Key rules¶
Server builds and lifecycle¶
- 7
GAMESERVER-1Drive each game server through the hosting platform's lifecycle with its server SDK: report ready only when it can accept players, keep its health checks passing, mark it allocated when a match starts, and end the process when the match is over. In Agones, callReady(),Health()andShutdown(), and let the matchmaker allocate with aGameServerAllocationrather thanAllocate(); in GameLift, callProcessReady(), answeronHealthCheck()within 60 seconds, callActivateGameSession(), and callProcessEnding()and exit when the session is over, so that the hosting resources are recycled. (Agones, Client SDKs: lifecycle management, Agones, Health checking, Amazon GameLift Servers, Add Amazon GameLift Servers to your game server) - 7
GAMESERVER-2Ship the server as its own headless build without rendering, audio or client-only assets: Unity's Dedicated Server build target, an UnrealServertarget, or a Godot export preset in Export as dedicated server mode. Unity's target turns off the audio subsystem and removes GPU-only assets, and Multiplayer Roles strip client-only GameObjects; Godot's mode replaces textures and materials with placeholders; Unreal needs a source build of the engine to build a server target. (Unity, Dedicated Server optimizations, Unity, Multiplayer roles, Unreal Engine, Setting up dedicated servers, Godot, Exporting for dedicated servers) - 7
GAMESERVER-3Choose the lowest tick rate that gives an acceptable player experience, and keep each tick within its time budget, with no database or HTTP calls inside it. Load player data when players join, keep the match state in memory, and save results when the match ends or on a coarse interval; Nakama ends a match whose loops keep falling behind. (Nakama, Authoritative multiplayer: tick rate, Nakama, Server framework best practices: match handlers)
Scaling and disruption¶
- 9
GAMESERVER-4Don't let a scale-down or node maintenance end a running match. On GameLift, set the fleet's game session protection policy toFullProtection, because the default,NoProtection, lets a scale-down end active sessions; on Agones, seteviction.safefrom your session length andSIGTERMhandling, and for sessions longer than an hour control node upgrades yourself, for example with blue/green clusters. (Amazon GameLift Servers, Prepare for launch, CreateFleet: NewGameSessionProtectionPolicy, Agones, Controlling disruption, Agones, GKE best practices) - 7
GAMESERVER-5Scale each fleet with a buffer of ready servers: start with a generous buffer and a maximum well above the expected peak, and lower the buffer later from real usage. Use an Agones FleetAutoscaler with aBufferpolicy and the defaultPackedscheduling, which lets the cluster autoscaler remove empty nodes, or GameLift target-based auto scaling onPercentAvailableGameSessions; for launch, GameLift suggests 20% idle capacity and a maximum of twice the expected peak. (Agones, Fleet Autoscaler: ready buffer autoscaling, Agones, Scheduling and autoscaling: Packed, Amazon GameLift Servers, Target-based auto scaling, Prepare for launch) - 7
GAMESERVER-6Handle the shutdowns you can't prevent: when the platform signals termination, stop accepting players, save the match state, disconnect players cleanly and exit before the deadline. GameLift callsonProcessTerminate()for unhealthy processes, scale-downs and Spot interruptions, andGetTerminationTime()returns the deadline; on Agones, handleSIGTERMwithinterminationGracePeriodSeconds. This appliesOPS-15andK8S-3. (Amazon GameLift Servers, Respond to a server process shutdown notification, Agones, Client SDKs: Shutdown, Agones, Controlling disruption: considerations) - 7
GAMESERVER-7Run game servers in more than one region, and in more than one cluster or fleet per region, and allocate across them, so that one failed cluster doesn't stop matches from starting. Agones suggests spreading game servers across fault domains and across several clusters within each, allocating across clusters through a service mesh, and upgrading Agones and Kubernetes by moving a growing share of matches to a new cluster; GameLift recommends multi-location queues. This appliesOPS-13. (Agones, Best practices: redundant clusters, Agones, Upgrading Agones: multiple clusters, Amazon GameLift Servers, Build a multi-location queue)
Matchmaking and placement¶
- 8
GAMESERVER-8Let a backend service that authenticates players request matches and game servers for them, and take skill ratings and other matching attributes from server-side data, not from the client. Game clients shouldn't call the GameLift API directly; in Nakama, which is such a backend, set matchmaker properties authoritatively in a before hook onMatchmakerAdd. This appliesSEC-1andGAMEDEV-5. (Amazon GameLift Servers, Build a backend service, Nakama, Matchmaker: properties) - 7
GAMESERVER-9Place each match in the region with the lowest measured latency for its players: have clients time UDP round trips to each region, send the results with the matchmaking request, cap the latency you accept, and relax the limits step by step while players wait. UDP pings reflect game traffic better than ICMP pings. (Amazon GameLift Servers, UDP ping beacons, Create a player latency policy, FlexMatch, Allow requirements to relax over time, Agones, Latency testing services, Nakama, Matchmaker: expanding criteria)
Releases and versions¶
- 8
GAMESERVER-10Roll out new server builds without ending running matches: start the new version next to the old one, send new matches to it, and let the old servers exit when their matches end. Agones rolling updates never deleteAllocatedgame servers, and a second Fleet thatGameServerAllocationprefers allows canary tests and rollback; on GameLift, create a new fleet and move traffic with an alias or queue, and replace fleets at least every 30 days, because only a new fleet gets a newer AMI. This appliesOPS-15. (Agones, Fleet updates, Agones, Canary testing a new Fleet, Amazon GameLift Servers, Managing game server updates, Security best practices: keep fleet runtime environments up to date) - 7
GAMESERVER-11Version the network protocol, check the version when a client connects, and reject clients that don't match; send players only to servers running a build compatible with their client. Unreal comparesFNetworkVersionvalues, by default a checksum of the engine version, project name and project version, and Netcode for GameObjects checks that the client'sNetworkConfig, includingProtocolVersion, matches the server's; Agones allocation selects servers by label, such as a version label. (Unreal Engine 5.7 API, FNetworkVersion::GetLocalNetworkVersion, Game Mode and Game State: PreLogin, Netcode for GameObjects, Connection approval, NetworkConfig.ProtocolVersion, Agones, GameServerAllocation across Fleets)
Security¶
- 9
GAMESERVER-12Before launch, replace every default credential and close every administration port: change Nakama'ssocket.server_key,session.encryption_key,runtime.http_keyand console password, and close RDP (3389) and SSH (22) on live fleets. Give game servers short-lived credentials for other services through the fleet's role, such as GameLift'sGetFleetRoleCredentials(), asSEC-14asks, and keep the Kubernetes API token out of the game server container, which Agones does by default. This appliesSEC-2. (Nakama, Configuration: common properties, Amazon GameLift Servers, Prepare for launch: testing, Security best practices: ports, Access AWS resources with an IAM role, Agones, GameServer Pod service accounts) - 8
GAMESERVER-13Admit to a match only the players the matchmaker placed in it: the client presents its player session or ticket, and the server validates it before accepting the connection. Use GameLift'sAcceptPlayerSession(), Unreal'sPreLogin, Netcode for GameObjects' connection approval or Godot'sSceneMultiplayerauthentication callback; Netcode for GameObjects doesn't encrypt connection approval data, so don't send tokens in it without an encrypted transport. This appliesSEC-1andSEC-7; on Steam, also verify the player's session ticket (STEAM-5). (Amazon GameLift Servers, Validate a new player, Unreal Engine, Game Mode and Game State, Netcode for GameObjects, Connection approval, Godot, High-level multiplayer: authentication) - 8
GAMESERVER-14Keep player inventories, currencies, progression and scores in data that only server code can write. In Nakama, write such storage objects from the server runtime with No Write permission for clients, keep currencies in wallets, which only runtime code can change, and create leaderboards as authoritative, because by default clients can submit scores; verify store purchases on the server, asMOBGAME-1asks. This appliesSEC-1andGAMEDEV-5, andSTEAM-8does the same for Steam stats and leaderboards. (Nakama, Access controls: object permissions, User accounts: virtual wallet, Leaderboards: authoritative leaderboards, In-app purchase validation) - 7
GAMESERVER-15Rate-limit each player's actions and traffic, and protect game servers from DDoS attacks, for example with a relay that hides their IP addresses. Limit frequent actions in server code and backend APIs, and the number of game sessions one player can create, such as with GameLift'sResourceCreationLimitPolicy; GameLift's player gateway relays player traffic, rate-limits each player and admits only traffic with a valid player token. This appliesAPI-11. (Godot, High-level multiplayer: secure multiplayer design, OWASP API Security Top 10, API4:2023 Unrestricted Resource Consumption, Amazon GameLift Servers, CreateFleet: ResourceCreationLimitPolicy, DDoS protection with Amazon GameLift Servers, Player gateway, Edgegap, DDoS protection)
Observability¶
- 7
GAMESERVER-16Record tick time and achieved tick rate for every game server, along with players, active sessions and crashed or abnormally terminated sessions, and alert on severe problems such as ticks that overrun their budget. Export them like other metrics (OPS-11), and keep match and player IDs off metric attributes (OTEL-6). (Amazon GameLift Servers, Telemetry metrics: available metrics, Monitor with Amazon CloudWatch, Agones, Metrics, Prepare for launch)
Tutorials and further reading¶
- 7 Agones quickstarts: creating a GameServer, a Fleet and FleetAutoscalers, and editing a first game server.
- 7 Setting up dedicated servers (Unreal Engine): building, cooking and running a dedicated server and clients for the Lyra sample.
- 6 Development roadmap for managed EC2 hosting (Amazon GameLift Servers): the steps from integrating a game server to a backend service, FlexMatch and managed fleets.
- 5 Global multiplayer demo (Google for Games): a reference game with an Unreal Engine 5 client and dedicated server, Agones on globally distributed GKE clusters, Open Match, Terraform and Cloud Deploy. It uses Open Match 1.