Deployments

Learn about deployments and their lifecycle - concepts and best practices for deeper understanding.

If you're new to Edgegap, we recommend starting with:

πŸ—ΊοΈ Orchestration

Edgegap Deployment service starts new servers on demand, only once your players need them, using cloud-native approach, and treating server instances as cattle rather than pets - replacing faulty instances entirely instead of nursing each one manually. To fully understand the pros and cons, let’s compare with other orchestration methods.

Your orchestration choice will impact your devops cost, server cost, and scalability.

1. Just-in-Time Deployment

Golden standard for modern studios providing the easiest integration with best cost efficiency.

πŸ‘ Advantages

  • lowest hosting cost, scaling capacity to meet demand minute by minute,

  • lowest devops cost due to region-less hosting, Edgegap automates 99% of tasks,

  • lowest ping time due to 615+ sites in Edgegap’s global server pool,

  • fastest scale up (burst-ability) in case of unexpected traffic spike (~3s to deploy),

  • highest standard of security and player cheating prevention (server authority),

  • minimal impact of unexpected server crash on players, only affecting a single match.

πŸ‘Ž Disadvantages

  • adopting a new orchestration mental model requires some ramp up effort initially,

  • servers running longer than 24 hours will be automatically terminated.

🧩 Best Suited For

  • competitive, latency-sensitive games - netcode optimization can only get you so far,

    • First Person Shooters, Fighting Games, VR & XR (virtual and extended reality), …

  • match-based games - with an upper limit on match duration,

    • MOBA, Battle Royale, Cooperative Shooters, Sports Games, ARPGs & Dungeon Crawlers, …

πŸ”Ž Discoverability

Edgegap automatically scales all 615+ server locations up/down based on player activity in each region. Prepare for success - seamlessly scale to 14 million concurrent users in 60 minutes.

2. Regional Standby

Traditional model for live games seeking easy and cost efficient alternative to their current hosting.

πŸ‘ Advantages

  • highest standard of security and player cheating prevention (server authority),

  • familiar and easy to understand, traditional approach for battle-scarred veterans,

  • allows long-running servers past 24 hours of lifetime (frequent backups recommended).

πŸ‘Ž Disadvantages

  • higher hosting cost, each region requires 1+ unused standby servers (burst capacity),

  • higher devops cost, operations and maintenance duplicated per region,

  • varying ping time depending on player location, usually up to 15 server server locations,

  • unexpected server crash may impact multiple matches, if hosted on the same machine.

🧩 Best Suited For

  • asynchronous multiplayer games - server crashes have minimal impact on player experience:

    • race against ghosts, loot enemy base, timer-based social building/farming games, …

  • latency-tolerant games - when server authoritative real-time physics aren’t required:

    • MMOs, some Cooperative Games, TCGs/CCGs, Turn-Based Strategies, …

  • applications with heavy initialization process - when preparing servers takes minutes.

πŸ”Ž Discoverability

See Managed Clusters for self-hosting your microservices and backend services on Edgegap.

3. Player-Host Authoritative

Shift development efforts from dedicated servers to relay netcode for non-competitive games.

πŸ‘ Advantages

  • lowest hosting cost, requiring only Relay servers to solve NAT punch-through

  • lowest devops cost, maintenance required only for client builds and distribution channels

  • minimal impact of unexpected server crash on players, only affecting a single match,

  • easy to implement and fast time to prototype, without any backend development required,

πŸ‘Ž Disadvantages

  • increased peer-to-peer netcode development effort requiring concurrent programming skills,

  • worst ping times and most sensitive to unfavorable network conditions (e.g. mobile internet),

  • weakest security, vulnerable to man-in-the-middle attacks and session hijacking,

🧩 Best Suited For

  • cooperative & casual games - when cheating doesn’t take away from fun or break the game,

    • Open-World Sandbox Games, Kids Games, Exploration Games, Adventures, …

  • indie games seeking funding - cost-effective option to produce a publisher demo.

πŸ”Ž Discoverability

πŸ“ Server Placement

No matter which orchestration method you choose, picking the right server location for each player (or a group of players) is crucial in ensuring the best possible ping, and optimal player experience. Learn about different strategies for server placement, and how they impact your players.

Your server placement strategy will impact your players’ experience, retention, and your game reviews.

See Deployment Balance Points to analyze server placement in real time, at scale.

1. Server Score Strategy (Best Practice)

Server score strategy uses Edgegap’s patented placement methodology, which optimizes placement of servers for each match individually. Our system performs non-intrusive telemetry to approximate each player’s network proximity to our server locations, and chooses the server which aims for:

  • responsiveness - provides lowest ping for all players on average,

  • fairness - provides a balanced and fair ping for all players.

Unresponsive placement - server is far away, high ping for all players:

Unfair placement - uneven ping, one player is at a disadvantage:

Good placement example - responsive and fair ping for all players:

This strategy is especially effective for hosting a group of players far away from each other (North America vs. Europe, or West coast vs. East coast), frequently the case with pre-made lobbies.

2. Geolocation Strategy

Alternatively, provide players' latitude & longitude coordinates or coordinates of a preferred server location instead of leveraging automated telemetry. This approach requires additional client-side geo-lookup implementation, fully relying on game developer’s solution.

3. Region Lock Strategy

As the last resort, servers may be placed based on a crudely generalized region parameter, either:

  • automatically chosen for the player, based on their metadata (player account database), or

  • selected by the player during matchmaking, allowing placement with high client-server latency.

🟒 Connection Quality

Some games (and some players) are more sensitive to latency or lag than others. While player reports are a great indicator of incidents or regression bugs at scale, players may lack deep understanding of networking concepts and are quick to assign blame to studios, netcode, or servers.

Root cause of some issues may be hidden from players, so cooperation of studio and hosting provider may be crucial. Edgegap’s priority is always to provide the best possible service.

If you’re receiving numerous player reports, experiencing widespread outages, or repeated issues, please reach out to us immediately through a support ticket in our platform.

If you need help, please reach out to us over Discord. For live games support see our ticketing system.

Low Latency

Player latency is a combination of latency from transferring data between:

  • physical devices - the physical signal travelling across Internet networking topology,

  • host to host - resulting from protocol, transport, and security measures,

  • process to process - resulting from (un)boxing and processing data in client/server.

Edgegap reduces physical latency by placing servers closer to your players for shorter responses and lower number of network hops. With locations across 17 cloud and bare metal providers, you get best-in-class ping for players anywhere in the world.

Server and internet coverage globally (not only with Edgegap) is limited due to factors like:

  • infrastructure availability - internet connection quality in a given region may not be sufficient,

  • natural factors - highly complex server racks require mostly stable environment.

High Availability

Availability of servers in various locations around the world will vary over time, changing multiple times throughout the day. Edgegap automatically scales up/down locations on demand, considering:

  • burst traffic - deployments made within a 15 minute period,

  • vCPU requirements - more vCPU per deployment increases overall demand for specific location,

  • provider offering - some remote locations have less provider options available,

  • machine availability - some locations may only offer 4 vCPU or 8 vCPU machines,

  • studio requests for testing, quality assurance, early access, closed betas, or tournaments.

All applications' deploy requests are combined to assess location demand. All organizations have equal allocation priority by default, with the possibility to add private server pools for enterprise customers requiring specific hardware or locations.

Player Issue Resolution

Player issues may be rooted in server bugs or provider incidents, but may also arise from third parties such as local ISPs, game services, bugs in low level libraries, infrastructure providers, or other sources.

When troubleshooting player reports or incidents, consider factors:

Notify users about widespread bugs, temporary issues, and outages to mitigate negative sentiment.

πŸ”„ Deployment Lifecycle

Edgegap deployments go through several lifecycle stages, denoted by deployment status.

1. Start a Deployment

A deployment for testing purposes may be started with:

A deployment for live production environment should be started with:

When testing with Deploy API, you may override default Dockerfile CMD with custom command.

2. Deploying

Once a deployment is started, our system will perform a number of steps in rapid succession:

  • Telemetry - we’re measuring network responsivity from available data centers to each player,

  • Deployment - we’re reserving capacity and preparing to start your server container,

  • Container Boot - we’re starting the container, installing dependencies, and initializing,

  • Post Processing - we’re adding log storage, monitoring, and finalizing the deployment.

3. Deployment Ready

Your container is fully initialized and your server is starting up now. For a few seconds/minute, your server may be still initializing and may not respond to player requests until your game engine (or custom runtime) is fully ready to accept player connections.

4. Deployment Error

Your deployment may end up in Error state at any point in time, for unexpected reasons. This is more likely to happen while testing your integration, or testing new server builds.

You are not charged for deployments in Error, which are automatically stopped after 24 hours.

Troubleshooting steps:

If you need help, please reach out to us over Discord. For live games support see our ticketing system.

5. Deployment Stopped

We never stop your servers without your directive, to prevent impacting your players’ experience negatively. Your deployment may be stopped for these reasons:

Once a deployment is stopped, we trigger graceful termination by sending SIGTERM signal to your main process, allowing a short termination period. Once expired, a SIGKILL signal is sent to stop deployment.

πŸ‘€ Observability

Allow game servers to interoperate with third parties and gain operational insights.

Discoverability

Once Ready, deployment is assigned a URL (fqdn) and an external port for each internal port.

Outbound traffic (to clients or backend) from your game servers is never blocked or filtered.

Websockets (WS) and Secure Websockets (WSS)

To use websocket-based netcode with Edgegap, you have two options:

  • managed certificate, set up in 1 minute without writing any code:

    • configure your Apps and Versions to use Websocket (WS) and Enable TLS Upgrade,

    • use Edgegap URL to connect clients (e.g. https://5fa53fa00a57.pr.edgegap.net/)

  • self-managed certificate, if you want to use your own custom domain:

    • configure your Apps and Versions to use Secure Websocket (WSS),

    • configure your own TLS certificate flow with a custom DNS record (e.g. on Cloudflare).

Injected Environment Variables

Game servers often need additional information, such as server IP, internal port values, or other.

To make accessing important information more convenient, we inject environment variables:

Basic Information

  • ARBITRIUM_REQUEST_ID - Unique deployment ID, also referred to as request ID. Used to retrieve more information. Example - f68e011bfb01.

    • Deployment URLs always have format {ARBITRIUM_REQUEST_ID}.pr.edgegap.net.

  • ARBITRIUM_PUBLIC_IP - Public IP address of this deployment. Example - 162.254.141.66.

  • ARBITRIUM_CONTEXT_URL - Only callable from the deployment, returns deployment details.

    • Example - https://api.edgegap.com/v1/context/9170f5211e17/17.

    • Requires ARBITRIUM_CONTEXT_TOKEN in Authorization header.

  • ARBITRIUM_CONTEXT_TOKEN - Example - dfaf50b9333b9ee07b22ed247e4a17e6.

  • ARBITRIUM_DEPLOYMENT_TAGS - Comma-delimited tags. Example - tag1,tag2

Port Mapping

  • ARBITRIUM_PORT_GAMEPORT_INTERNAL - Server listens on internal port. Example - 7777.

  • ARBITRIUM_PORT_GAMEPORT_EXTERNAL - Clients connect to external port. Example - 31504.

    • External port values are randomized for each deployment for security purposes.

  • ARBITRIUM_PORT_GAMEPORT_PROTOCOL - Protocol of your netcode transport. Example - UDP.

Lifecycle Management

  • ARBITRIUM_DELETE_URL - Callable from the deployment, deployment will be gracefully stopped.

    • Example value - https://api.edgegap.com/v1/self/stop/9f511e17/660.

    • Requires ARBITRIUM_DELETE_TOKEN in Authorization header.

  • ARBITRIUM_DELETE_TOKEN - Example - 7df4cd933df87084b34ae80d8abde293.

Structured Information (JSON as string)

Environment variables are stored as stringified JSONs, parse them using an SDK or a custom method.

ARBITRIUM_DEPLOYMENT_LOCATION: - Detailed information about deployment location.
ARBITRIUM_DEPLOYMENT_LOCATION="{
  "city": "Montreal",
  "country": "Canada",
  "continent": "North America",
  "administrative_division": "Quebec",
  "timezone": "Eastern Time",
  "latitude": 45.513707,
  "longitude": -73.619073
}"
ARBITRIUM_PORTS_MAPPING: - Detailed information about your internal and external ports.
ARBITRIUM_PORTS_MAPPING="{
  "ports": {
    "gameport": {
      "name": "Game Port",
      "internal": 7777,
      "external": 31504,
      "protocol": "UDP"
    },
    "webport": {
      "name": "Web Port",
      "internal": 8888,
      "external": 31553,
      "protocol": "TCP"
    }
  }
}"

Custom Variables

Define up to 20 custom variables for each deployment, each containing up to 4KB of string data.

Dashboard Monitoring

Our Dashboard provides utilities to monitor your server scalability and assist with operations.

Analytics

🌟 Upgrade to Pay as You Go tier to unlock detailed server performance metrics and insights:

  • General Insights: monitor releases with live server count per version + resource usage overview,

  • CPU Insights: troubleshoot lagging servers due to processor-heavy operations,

  • Memory Insights: mitigate server restarts due to exceeding allocated memory,

  • Networking Insights: detect inefficient networking patterns and optimize netcode.

Deployment Map

Preview deployment location, available locations, and estimated player locations on the map:

Deployment Balance Points

Preview deployment balance points heatmap and filter by Apps and Versions. Balance points are approximate locations with equal network proximity to each player in a given deployment:

Deployment Logs

Deployment logs display information about πŸ”„ Deployment Lifecycle:

Container Logs

Inspect your game server’s logs in case of issues, or when debugging:

Container Metrics

Review container metrics (processor, memory, networking) to:

  • identify common connection issues when 🚨 Troubleshooting,

  • detect inefficient implementation patterns causing spikes in resource usage,

  • pinpoint inefficient resource usage in particular scenarios,

  • verify changes in your server’s resource usage during optimization,

  • benchmark your server initialization resource consumption and duration.

History metrics display value averages with 1 minute time period, available in Free tier.

🌟 Upgrade to Pay as You Go tier to unlock precise metrics with 1 second time intervals.

Contact us prior to your release to request live hosting support for large scale releases.

Context & Status

Additional deployment information can be retrieved in JSON format:

Context API (from deployment) requires Context API token, while Status API uses your Edgegap token.

Filter Deployments

To quickly search amongst all deployments, you can use our dashboard:

List deployments with API and apply filters with backend integrations:

Deployment Attribute
Operators
Example Value

or

"ready" or "error"

or

or

"tagA"

or

[ "tagA", "tagB" ]

or

"my-app"

or

[ "my-app", "my-other-app" ]

or

"1.0.0"

or

[ "1.0.0", "prod" ]

true or false

or or

or or

or

5

Each attribute can have at most 1 filter operator in a single request. See API Reference for more.

Sort results by multiple fields in the order they appear in request:

Deployment Attribute
Order

Example filter queries:

List Deployments in Error to troubleshoot and remove.

Encoded URL:

https://api.edgegap.com/v1/deployments?query={"filters":[{"field":"status","operator":"eq","value":"error"},{"field":"application","operator":"eq","value":"my-app"},{"field":"version","operator":"eq","value":"green"}],"order_by":[{"field":"created_at","order":"desc"}]}

Formatted JSON query:

{
  "filters": [
    {
      "field": "status",
      "operator": "eq",
      "value": "error"
    },
    {
      "field": "application",
      "operator": "eq",
      "value": "my-app"
    },
    {
      "field": "version",
      "operator": "eq",
      "value": "green"
    }
  ],
  "order_by": [
    {
      "field": "created_at",
      "order": "desc"
    }
  ]
}
List Deployments with outdated App version to confirm a release is complete.

Encoded URL:

https://api.edgegap.com/v1/deployments?query={"filters":[{"field":"status","operator":"eq","value":"ready"},{"field":"application","operator":"eq","value":"my-app"},{"field":"version","operator":"eq","value":"blue"}],"order_by":[{"field":"created_at","order":"desc"}]}

Formatted JSON query:

{
  "filters": [
    {
      "field": "status",
      "operator": "eq",
      "value": "ready"
    },
    {
      "field": "application",
      "operator": "eq",
      "value": "my-app"
    },
    {
      "field": "version",
      "operator": "eq",
      "value": "blue"
    }
  ],
  "order_by": [
    {
      "field": "created_at",
      "order": "desc"
    }
  ]
}
List Deployments with available Session socket capacity to join.

Encoded URL:

https://api.edgegap.com/v1/deployments?query={"filters":[{"field":"status","operator":"eq","value":"ready"},{"field":"application","operator":"eq","value":"my-app"},{"field":"version","operator":"eq","value":"prod"},{"field":"is_joinable_by_session","operator":"eq","value":true},{"field":"available_session_sockets","operator":"gte","value":1}],"order_by":[{"field":"available_session_sockets","order":"desc"},{"field":"created_at","order":"asc"}]}

Formatted JSON query:

{
  "filters": [
    {
      "field": "status",
      "operator": "eq",
      "value": "ready"
    },
    {
      "field": "application",
      "operator": "eq",
      "value": "my-app"
    },
    {
      "field": "version",
      "operator": "eq",
      "value": "prod"
    },
    {
      "field": "is_joinable_by_session",
      "operator": "eq",
      "value": true
    },
    {
      "field": "available_session_sockets",
      "operator": "gte",
      "value": 1
    }
  ],
  "order_by": [
    {
      "field": "available_session_sockets",
      "order": "desc"
    },
    {
      "field": "created_at",
      "order": "asc"
    }
  ]
}

Webhooks & Postbacks

If you need to receive a simple HTTP notification when a deployment is Ready or in Error, you can specify a webhook URL in your deployment API request.

For reliable deployment observers, implement jittered exponential retry or poll Deployment Status API.

🚨 Troubleshooting

When troubleshooting deployments:

  1. verify there are no errors in your Deployment Logs and Container Logs,

  2. run your server locally to rule out integration bugs,

  3. review troubleshooting steps on this page,

  4. reach out to us in Community Discord and include your deployment ID.

See Player Issue Resolution for our recommendations on navigating player community feedback.

Can’t connect clients to server - Request timed out., 请求袅既 , ConnectionFailed , or Port verification failed.
  • First, make sure that the deployment is Ready, and there are no runtime exceptions or errors in your deployment log. If your deployment stopped, inspect logs in our Dashboard.

  • If you’re using Mirror netcode you need to have "Auto Start Server” selected in your NetworkManager , rebuild, push, and redeploy your server.

  • If you’re using FishNet netcode you need to enable β€œStart on Headless” in your ServerManager, rebuild, push, and redeploy your server.

  • If you’re using Photon Fusion 2 netcode, please ensure that your server is passing the deployment public IP, external port and the roomCode on the server, and the same room code in the client in the β€œNeworkRunner.StartGame” parameter StartGameArgs. Deployment ID (e.g. b63e6003b19f) is a great choice as it’s globally unique and easily accessible to client by Matchmaker assignment and to the Injected Environment Variables.

  • Next, please verify that your port setting in your server build’s netcode settings matches the internal port in your App version. You can change the port mapping by editing the App version without rebuilding. Find your protocol in your netcode integration.

  • Please ensure that your game client is connecting to the external port shown on your Deployment details page, this value will be always randomized due to security reasons.

  • If you’re using Secure Websocket (WSS) protocol in your netcode integration, please ensure that your App version port configuration for the WSS port has TLS Upgrade enabled.

  • Are you located in China and are using Smart Fleets? Your connection may be blocked by the Great Firewall. Consider adding a server located in China to your fleet, or using a VPN to connect.

My deployment stopped/restarted and I can’t access it’s logs anymore.
  • In case the server process crashes due to an exception, our system will attempt restarting the server automatically. Consider testing your server locally to uncover the root cause.

  • We only keep logs for the duration of the deployment, if you wish to inspect logs after deployment stops, please integrate a third party log storage.

  • See 5. Deployment Stopped to discover all causes for stopping your deployment.

My deployment stopped automatically after X minutes.
  • Free Tier deployments have a 60 minute time limit, please consider upgrading your account.

  • All deployments will be terminated after 24 hours of runtime following our server sanitization policy, for infrastructure maintenance, and to prevent racking up unexpected costs when deployment wasn’t shut down properly. For long-running servers, consider using Smart Fleets.

  • See 5. Deployment Stopped to discover all causes for stopping your deployment.

My deployment is ready but I’m not able to connect for several minutes afterwards.
  • Once a deployment is Ready, your game engine initialization begins. This process may take anywhere from seconds to minutes, and the server doesn’t accept to player connections during this period.

  • Consider optimizing your server initialization to decrease this time period.

  • Game clients should retry connection in 1 second intervals for a limited amount of time (depending on your initialization duration), after which they return to matchmaking.

  • Consider adding a loading scene so the server can perform initialization (and travel in case of Unreal Engine) at the same time as clients, while synchronizing state of both.

What will happen if a player leaves my deployment?
  • By default, servers don’t reject player connections. Authenticating players is up to your devs, since many different methods and player authentication providers can be used.

  • Game clients may store connection information locally to attempt reconnecting in case of unexpected client crashes.

  • To allow players to join games in progress, consider using Backfill or Sessions.

My server shows 100% CPU utilization after becoming ready.
  • This may not be an issue, as game engines tend to perform CPU-heavy operations during server initializations. If the CPU usage doesn’t drop after 2-3 minutes from deployment start, you may need to optimize your server or increase app version resources.

  • Reducing tick rate can impact CPU usage as the server performs less messaging operations.

  • If you’re using Mirror netcode you need to have "Auto Start Server” selected in your NetworkManager , rebuild, push, and redeploy your server.

  • If you’re using FishNet netcode you need to enable β€œStart on Headless” in your ServerManager, rebuild, push, and redeploy your server.

  • You’re limited to 1.5 vCPU and 3GB of memory (RAM) in Free Tier.

  • You may increase allocated resources when creating a new app version. You can duplicate your App version in our Dashboard and adjust these values as needed, without rebuilding your server or image.

My deployment is restarting repeatedly and shows error `OOM kill` .
  • This behavior is caused by exceeding allocated memory amount. Consider optimizing memory usage with object pooling, compression, or removing unneeded objects in your scene.

  • Ensure your project is loading the default scene containing your NetworkManager and the scene is included in Unity’s Build Settings.

  • You’re limited to 1.5 vCPU and 3GB of memory (RAM) in Free Tier.

  • You may increase allocated resources when creating a new app version. You can duplicate your App version in our Dashboard and adjust these values as needed, without rebuilding your server or image.

Sometimes, my server’s memory (RAM) usage spikes to a high value, is that a problem?
  • As long as you stay within the allocated app version memory amount, this is not an issue.

  • Exceeding the allocated app version memory amount will cause `OOM kill` (see above).

Will my server performance be impacted by other servers running on the same machine?
  • No, our platform ensures that allocated resources will not be used by other studios, or other servers on shared infrastructure. With Edgegap, there are no noisy neighbors.

Last updated

Was this helpful?