LogoLogo
edgegap.comDashboard
  • 📘Learning Center
    • Getting Started
    • Unity Games
      • Getting Started - Servers
      • Developer Tools
    • Unreal Engine Games
      • Getting Started - Servers
      • Developer Tools
    • Matchmaking
      • Getting Started
      • Matchmaker In-Depth
      • Ping Beacons
    • Advanced Features
      • Apps and Versions
      • Deployments
      • Managed Clusters
  • API Reference
    • Dedicated Servers
    • Integration
    • Matchmaking
    • Peer to Peer
  • Release Notes
  • 📚Documentation
    • Sample Projects
      • Unity Netcodes
        • Unity NGO
        • Photon Fusion 1
        • Photon Fusion 2
        • Mirror
        • Mirror WebGL
        • Fishnet
        • Fishnet WebGL
        • Photon Bolt
      • Unreal Top-Down Sample
      • NuxtJS
      • Ruby On Rails
      • Unity Lobbies
      • Unity Matchmaker
    • Tools & Integrations
      • Container
        • What is Docker
        • Your First Docker
        • The Good Practices
        • SSH in Your Container
        • External Registries
          • Docker Hub
          • AWS ECR
          • GCP GCR
          • Gitlab registry
      • Deploy from Nakama
      • EOS Lobby Integration
      • Switch From Gamelift
      • Switch From Multiplay
      • Playfab Bridge
    • Deployment
      • Endpoint Storage
        • How to Save Logs
        • Upload File to Deployment
      • Webhooks
    • Application
      • Command and Arguments
      • 1:1 Port Mapping
    • Session
      • How They Work
      • Application Version Configuration
      • Manage Request
      • Selectors Filtering
    • Fleet
      • Fleet Policy
      • Policy Filter
      • Linking Version
      • Fleet's Deployment
    • Container Registry
    • Distributed Relay
      • Matchmaker/Lobby
      • Relay Edgegap API
      • Transport Samples
    • Lobby
      • Lobby Service
      • Functions
    • Glossary
    • SLA Terms
Powered by GitBook
LogoLogo

Connect with Community

  • Discord
  • Linkedin
  • X

Read More

  • Release Notes
  • Blog
  • Enterprise
  • Legal
  • edgegap.com

© 2025 Edgegap

On this page

Was this helpful?

  1. Documentation
  2. Session

Application Version Configuration

PreviousHow They WorkNextManage Request

Last updated 2 months ago

Was this helpful?

In this section, we will cover how to properly set up your application to efficiently use sessions. We will show you how to use the finer settings to tailor usage to your specific needs. We won't cover the basic application version configurations here, but you can refer to this to learn more about them.

If you're still unsure about which product best suits your needs, don't hesitate to join our for assistance. However, if you've made it this far, you're likely confident that you need to use sessions in your application.

Best Practices for Configuring Sessions in Your Application Version

All configuration related to sessions can be found under the session_config key when .

Session Kind

As mentioned earlier, one of the first things you will need to do is choose the type of session, either Match or Seat. A quick recap would be that you need to use Seat if you want each player to have their own socket, and use Match if you want each session to have a shared socket for all players.

When using Seat sessions, each player is represented by an IP address that you send to us in the session request. It is important to include the IP address, as it allows us to accurately track socket usage for each deployment. Without it, you may not be able to see the socket usage information you need.

There is a third option called Default, which means that the session feature is not used. This is the default option for application versions created without specifying a session kind.

Session Sockets

The session sockets parameter determines the maximum number of players or matches, depending on the session type, that can be hosted on your deployment at any given time.

If you use Seat, the number of session sockets will mostly depend on how many simultaneous players you want to host in a single instance of your server. If you use Match, it will depend more on the optimization of your server code. Generally, the fewer resources each instance consumes, the more session sockets you can fit into a single deployment.

Autodeploy

Unless you want to fully manage your deployment on your own backend, this option is recommended to ensure that your sessions don't fail. It guarantees that you will always have a deployment available on demand to host your sessions whenever needed.

The autodeploy option is a simpler version of a , where the system automatically creates deployments based on the demand of your application, without any minimum or maximum restrictions. It can be useful for applications that have a highly variable demand and need to scale up and down quickly without any constraints.

Empty Time to Live

This option determines how long a deployment without any active sessions should be kept before being automatically deleted. We recommend setting a value to avoid the cost of running unused deployments for too long.

This is especially important if you're using the autodeploy option, as it could result in a buildup of unused resources if not managed properly. This option enables fully automated scale down of game servers.

To ensure proper functioning of this feature, it is imperative that you delete your `Seat` or `Match` session when they are no longer needed. Otherwise, we will not be able to perform the scale down. Please note that we do not determine that a deployment is empty when there are no more connections, but when there are no more sessions associated with the deployment.

Session Deletion Delay

If you need to delete a deployment and there are still sessions on it, the sessions won't be immediately deleted. You can set how much time after the termination of the deployment your sessions should be deleted. This allows you to perform any necessary manipulation on the sessions before they are deleted. By default, the deletion time is set to 60 minutes, and you cannot set it to a value lower than that.

The name of this variable is session_max_duration in both the API and dashboard, although we acknowledge that the name can be confusing.

If you delete a deployment before disconnecting your players and terminating the sessions, it will disconnect the players from the server, as the server will no longer be available. This is not recommended.

You probably will not need to set this value unless you have specific needs. In most cases, it is recommended to leave it at the default value.

📚
part of the documentation
Discord
creating an application version
fleet