Skip to main content

ServerState

Lifecycle/capacity state of a game/GraphQL server in the fleet. Only ReadyForClients servers should receive new client connections; serverWithLeastClients and activeGraphQLServers already filter to healthy, non-overloaded servers.

enum ServerState {
Starting
ReadyForClients
Stopping
Offline
NearCapacity
Full
}

Values

ServerState.Starting

The server is booting and not yet accepting clients. Do not route new connections here; wait for ReadyForClients.

ServerState.ReadyForClients

The server is healthy and accepting clients. This is the only state safe to route new connections to.

ServerState.Stopping

The server is draining and shutting down: existing sessions may continue briefly but no new clients should be routed here.

ServerState.Offline

The server is down or unreachable (failed health checks). Do not route any traffic here.

ServerState.NearCapacity

Soft resource overload (a CPU core or system memory has been high for several seconds). Existing sessions continue, but the server is excluded from serverWithLeastClients so no new clients are routed here until it recovers.

ServerState.Full

Hard resource overload. Like NearCapacity (excluded from new-client selection), and the server is also actively shedding clients: it sends each affected client a reconnect command and drops their session after a short grace period so they migrate to another server.

Member Of

GraphQLServer object ● ServerStatus object