Game server management

Note: The content on this page pertains to Managed Game Server Hosting (Clanforge). If you’re using Game Server Hosting (Multiplay), refer to the Game Server Hosting (Multiplay) documentation.

When the matchmaker requests an allocation, Game Server Hosting needs to ensure that the allocated server is running so clients can connect to it. Game Server Hosting also needs to be able to start and stop servers when scaling them up and down.

Game Server Hosting monitors and manages game servers to verify that they're healthy and to report their status back to customers.

Game server states

Game server states are states of configuration in which game servers can exist. Each game server can exist in one of the following states:

  • Allocated
  • Available
  • Stopped
  • Deleted
  • Locked

Allocated

When a game server has an active allocation UUID and is hosting a game session, it’s in an allocated state. Allocated game servers might or might not have active players connected to the game session it's hosting.

Available

A game server is available when it's online and doesn't have an active allocation. When a game server is available, it's in the available game server pool and for a matchmaker to use in an allocation.

Stopped

A game server is stopped after it has received a stop command, usually through an automated process. Situations in which an automated process stops a game server instance include the following scenarios:

  • Before shutting down a machine to scale down, Game Server Hosting stops all the game servers on the machine.
  • Game Server Hosting stops and then restarts a game server if it's unresponsive.
  • If Game Server Hosting detects that a game server stops unexpectedly, it restarts the process.
  • Game Server Hosting stops and then restarts a game server if it crashes.
  • Game Server Hosting performs maintenance on the machines.

> Note: Game Server Hosting doesn't automatically stop allocated servers.

Deleted

Game Server Hosting deletes game servers in the following scenarios:

  • The machine hosting the game server is due for cancellation (bare metal only).
  • The machine hosting the game server is a cloud machine that's no longer necessary because the fleet region is scaling down.

Note: Game Server Hosting doesn't automatically delete allocated game servers. You must stop game servers before you can delete them.

Locked

Game Server Hosting temporarily locks a game server during sensitive operations to prevent server management actions, such as starting, stopping, or restarting the server. The locked state isn't mutually exclusive with the allocated, available, stopped, deleted, online, or offline states. Operations in which Game Server Hosting might lock a game server include the following scenarios:

  • Image installations
  • Maintenance operations

Image installations

Game Server Hosting locks all affected game servers while installing game images on a machine to prevent the game servers from starting up before the installation completes. Affected game servers are game servers that are configured to use the game image that the machine is installing or updating.

Maintenance operations

Game Server Hosting locks game servers on machines before performing maintenance work, such as system updates.

Game server actions

Game server actions are actions that you can perform on game server instances. The available game server actions include:

  • Start: The start game server action issues a start command to a game server. The start command brings a stopped game server back into an available state.
  • Stop: The stop game server action issues a stop command to a game server. The stop command brings the game server to an inactive state.
  • Restart: The restart game server action issues a restart command to a game server. The restart command issues a stop then a start command.

Game server action logs

Each game server has an action log that lists basic logs associated with the server ID. The action log only has logs from Game Server Hosting’s systems and doesn't list any logging from the game server binary. The action log includes the following logs:

  • Profile changes
  • Manual game server actions
  • Automatic game server actions
  • Game server problems
  • Configuration issues

If your game server binary stores log information in a file, you can expose the file through Game Server Hosting. When exposed, you and your team can access the file for each game server through Game Server Hosting Files.

Server stats

When querying the game server binary, Game Server Hosting collects statistics about each individual game server. The statistics include memory usage and player counts.

  • Minimum memory usage
  • Maximum memory usage
  • Average memory usage
  • Current memory usage
  • Minimum player count
  • Maximum player count
  • Average player count
  • Current player count

These statistics graphs offer information about how the game server instance is managing resources per connected player. You can access these graphs for a game server by visiting the game server stats page in Game Server Hosting. Each game server stats page has the following graphs:

  • Hourly server usage
  • Daily server usage
  • Weekly server usage
  • Monthly server usage
  • Yearly server usage

Game server crashes

Game Server Hosting monitors all game server instances for evidence of crashes. However, if the game server binary supports a game server query protocol, then the monitoring is more elaborate. If the game server binary supports a game server query protocol, then Game Server Hosting monitors the game server instances for the following items:

  • Periods of inactivity
  • Failures to respond to queries
  • Resource usage
  • Exit codes

If the game server binary doesn't support a game server query protocol, then Game Server Hosting only monitors the game server instances for exit codes. When Game Server Hosting detects evidence of a crash, such as an exit code or a failure to respond to queries, it restarts the game server instance.

Allocation pre-recover process

When a game server reports problems, Game Server Hosting's managed infrastructure tries to keep your game server instance alive. If the game server instance crashes, Game Server Hosting checks if the instance had players allocated to it. If the game server had players allocated, then Game Server Hosting tries an allocation pre-recover. An allocation pre-recover starts the game server process again with the same allocation UUID. If Game Server Hosting successfully restarts the process without errors, then the game server instance continues as normal. However, if Game Server Hosting can't restart the process, Game Server Hosting clears the allocation UUID to prevent matchmaking errors, and then marks the server as available again.