How Gameye Handles Host Maintenance Without Ending Live Matches

Hosts need security updates, reboots and new OS images. Here is how Gameye drains a node so running matches finish first, a real rollout across 10 production nodes, and the one thing your server should handle.

Andrew Walker
Head of Business Development at Gameye

Game server hosts need kernel patches, security updates and new OS images like any other machine. Players in the middle of a match shouldn’t notice any of it. On Gameye, a host that needs maintenance stops taking new matches, lets the ones already running finish, and leaves the fleet only when nothing is running on it. Your team doesn’t have to plan maintenance windows around your players.

This post shows how that works, with a real rollout from November, and the one thing your server should do to make the rare forced stop clean too.


Why maintenance and live matches collide

A web server can be taken out of a load balancer and rebooted in seconds, because each request is short and the next one goes somewhere else. A game server holds a match: players, game state and a result that hasn’t been saved yet. Reboot the host and every match on it ends.

That leaves two bad options. Skip or delay the updates, and the fleet falls behind on patches. Or schedule maintenance windows at quiet hours and accept that some players lose their match anyway, because a game with players in several regions never has a truly quiet hour.


How Gameye drains a node

Every Gameye session runs one match in one container. That makes a node easy to empty: you only have to stop starting new matches on it and wait for the current ones to end.

  1. The node marks itself unavailable. Gameye stops placing new sessions on it. New matches start on the other nodes in the same region, so your matchmaker doesn’t change anything.
  2. Running matches carry on. Nothing is stopped. Each match ends the way it always does: your server exits when the match is over, or your backend calls DELETE /session/{id}.
  3. The node leaves at zero. Only when no game servers are running does the node remove itself from the fleet.
  4. It comes back as a fresh node. It is patched or reinstalled, checked, and registers again, ready for new matches.

The session TTL you set is the upper bound on how long a drain can take. A match can’t outlive its TTL, so a node never waits forever on a server that hangs.


A real rollout: 10 production nodes on a new OS image

On November 26 we moved 10 production nodes in several regions, including 4 in Sydney, onto a new operating system image. Each one went through the four steps above.

Our container metrics show zero running game servers on every one of those 10 nodes in the seconds before it left the fleet. No match was cut short. The Sydney nodes were reinstalled on the new image and rejoined as new nodes the same evening.

Customers didn’t schedule anything and didn’t have to be online for it.


When a server does have to stop

Some stops are deliberate: your backend ends a session, or its TTL runs out. In those cases Gameye doesn’t kill the container straight away. It sends SIGTERM to the server’s main process and waits up to 50 seconds before it uses SIGKILL. Your server gets that time to save the match result, write logs or upload files, and close player connections.

To use that window, handle SIGTERM in your server and run the same shutdown path as a normal match end:

The TTL and billing FAQ covers the full stop sequence and how to fetch files from a container with the artifacts endpoint.


What you need to do

Almost nothing, and that’s the point.

Maintenance itself is ours to plan. If you want to see it with your own build, the free trial runs the same orchestration, or talk to an engineer about your match lengths and regions.