MultiConnectMultiConnectDocs Website home
MultiConnectCloud › Server Deployments

12. On-demand game servers

On-demand applies to Master–Worker deployments with Game servers set to On demand. Your master starts one game server (an instance) for each match, and it ends when the match does.

With MultiConnectSDK, the hosted master does this by itself. See the Developer Guide. Without it, your master or backend uses the instance API.

Limits

Limit Where it is set Range
Most instances running at once, across the deployment Most running at once 1 to 50
Most instances running at once in one region That worker region's Most at once 1 to the plan's limit per region
Longest an instance may run Longest a server may run (minutes) 10 to 240 minutes. A start request can ask for a shorter time

Worker regions on an on-demand deployment always have a minimum of 0, and autoscaling does not apply: your master decides how many run.

An instance's life

  1. Your master asks for an instance. The platform picks a host and reserves a port in that same call, and returns the address straight away, in state Starting.
  2. When the server passes its health check, it is Ready and instance.ready is sent. Send its players to host:port, or wsUrl for WebSocket clients.
  3. The instance ends at the first of these, and billing stops then:
    • Its process exits. This is the normal end of a match: post your results, then exit.
    • Your master removes it. It receives SIGTERM, a short grace (30 seconds by default), then SIGKILL.
    • Its maximum lifetime runs out.
    • Its host stops responding. Instances are never moved to another host.
    • The deployment is stopped or deleted.

States: Starting, Ready, Failed, Removed. Removal reasons: Requested, Exited, MaxLifetime, HostLost, StartFailed, DeploymentStopped, DeploymentDeleted.

Before starting an instance, the platform checks that your balance covers the instance for its whole lifetime.