Game server lifecycle

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

Game servers using the Game Server Hosting service go through a series of statuses depending on their state. The game server lifecycle is the series of statuses through which a server transitions:

Online

A server is online when you’ve started the server but it'sn't yet ready to accept players.

Allocated

A server is in the allocated state when a matchmaker assigns it to a game session.

After receiving an allocation request from your matchmaker, Game Server Hosting selects the best possible game server to allocate for the match based on the requirements in the allocation request. After Game Server Hosting allocates the selected game server, the Game Server SDK notifies the game server that it’s been allocated.

Note: The requirements in an allocation request typically include a region and a build configuration.

Ready for players

A server is ready for players when it’s running and you’ve let Game Server Hosting know that the game server is ready to accept players.

When the game server is ready to start accepting connections from players, you must let Game Server Hosting know that the server is ready for players to connect using the Game Server SDK.

See Server readiness.

Unready for players

A server is unready for players when it’s running and you’ve let Game Server Hosting know that the game server is no longer ready to accept players.

When the server is no longer ready to start accepting connections, mark the server as unready using the Game Server SDK.

Deallocated

A server is in the deallocated state when Game Server Hosting removes the allocation from the server.

When the matchmaker determines that the game server is ready for reuse, it sends a deallocation request to Game Server Hosting. Once deallocated, the game server returns to the pool of available servers. The Game Server SDK notifies game server instances of deallocate events.

See Deallocation flow and Allocations for additional information.