Game server management
Documentation for Game server management
Read time 3 minutesLast updated 4 hours ago
When the matchmaker requests an allocation, Clanforge needs to ensure that the allocated server is running so clients can connect to it. Clanforge also needs to be able to start and stop servers when scaling them up and down. Clanforge 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, Clanforge stops all the game servers on the machine.
- Clanforge stops and then restarts a game server if it's unresponsive.
- If Clanforge detects that a game server stops unexpectedly, it restarts the process.
- Clanforge stops and then restarts a game server if it crashes.
- Clanforge performs maintenance on the machines.
Note: Clanforge doesn't automatically stop allocated servers.
Deleted
Clanforge 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: Clanforge doesn't automatically delete allocated game servers. You must stop game servers before you can delete them.
Locked
Clanforge 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 Clanforge might lock a game server include the following scenarios:- Image installations
- Maintenance operations
Image installations
Clanforge 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
Clanforge 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 Clanforge’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
Server stats
When querying the game server binary, Clanforge 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
- Hourly server usage
- Daily server usage
- Weekly server usage
- Monthly server usage
- Yearly server usage
Game server crashes
Clanforge 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 Clanforge monitors the game server instances for the following items:- Periods of inactivity
- Failures to respond to queries
- Resource usage
- Exit codes