> For the complete documentation index, see [llms.txt](https://docs.edgegap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgegap.com/learn/orchestration/player-sessions.md).

# Player Sessions

Discover session orchestration concepts and key differences between Lobby, Group, Session, and Social Hub. Learn how to use your Lobby with Edgegap.

Edgegap supports several managed and custom player session management models. When choosing a model, consider aspects like authority, duration, stickiness, and quality of service.

## 🚀 Getting Started

Consider a complex game design offering all possible session models. Most games start with a smaller subset and sometimes expand to include more session systems later.

{% hint style="info" %}
See [#key-concepts](#key-concepts "mention") below for a clear-cut differentiation between session-related concepts.
{% endhint %}

<figure><img src="https://3027732442-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR0dHSFv9ymoC0DO5G8J%2Fuploads%2F7RalnCJMkfGvNrw3Qwtb%2FUntitled-2026-09-18-1656.png?alt=media&amp;token=a309d4e2-0c22-4ec0-8b1f-e738341a1e34" alt=""><figcaption><p>Lobby to Session Flows</p></figcaption></figure>

When testing new builds with developers or QA teams, the session step is often skipped and players connect directly to deployments while hard-coding or disabling session related features. This enables faster development iteration and isolates session side effects from server features.

{% hint style="warning" %}
**Starting your Deployments manually and pasting URL and ports will not cut it for a live game.**
{% endhint %}

Automate popular game flows for [Player Sessions](/learn/orchestration/player-sessions.md) and server scaling with either:

{% columns %}
{% column width="33.33333333333333%" %}
[Matchmaking](/learn/matchmaking.md):

* Competitive Games
* On-Demand Matches
* Skill Rating and/or\
  Custom Rules
  {% endcolumn %}

{% column width="33.33333333333333%" %}
[Server Browser](/learn/server-browser.md):

* Persistent or Social
* Long Sessions
* Auto-Assign and/or\
  Custom Search
  {% endcolumn %}

{% column width="33.33333333333333%" %}
Custom Backend:

* Migrate Live Games
* [Deploy with v2 API](/docs/api/dedicated-servers.md)
* [Observe Webhooks](/learn/orchestration/deployments.md#webhooks)
  {% endcolumn %}
  {% endcolumns %}

## 📚 Key Concepts

Review our clear-cut definitions to easily differentiate between complex session concepts.

### Lobby

**Lobby** (also refered to as **Party**) refers to a short-lived and disposable group of players. Lobbies start with a friend invite (or join request), most commonly before a session (server connection) is established - to allow a group of friends to join the same game session together, and configure various parameters like character/role choice, game mode preference, map preference, or other.

Lobbies often span through multiple sessions, keeping the same set of friends together.

{% hint style="info" %}
Lobbies requesting allocation to a Session (new or existing) are often referred to as Groups.
{% endhint %}

{% hint style="success" %}
Lobbies rely heavily on social & friend features native to [distribution platforms](#user-content-fn-1)[^1]. **Edgegap services integrate your preferred Lobby service instead of replacing it.**
{% endhint %}

<table data-search="false"><thead><tr><th width="414">Game Backend (incl. third party Lobby Service)</th><th width="120" data-type="checkbox">Unreal Engine</th><th width="75" data-type="checkbox">Unity</th><th data-type="checkbox">Godot</th></tr></thead><tbody><tr><td><a href="https://dev.epicgames.com/docs/game-services/lobbies-and-sessions/lobbies/lobbies-intro">Epic Online Services Lobby</a><br>(Epic Games)</td><td>true</td><td>true</td><td>true</td></tr><tr><td><a href="https://partner.steamgames.com/doc/features/multiplayer/matchmaking#friends">Steamworks Lobby</a><br>(Valve Corporation)</td><td>true</td><td>true</td><td>true</td></tr><tr><td><a href="https://heroiclabs.com/docs/nakama/concepts/groups/">Nakama Group</a><br>(Heroic Labs)</td><td>true</td><td>true</td><td>true</td></tr><tr><td><a href="https://learn.microsoft.com/en-us/gaming/playfab/community/associations/groups/quickstart">Playfab Lobby</a><br>(Microsoft)</td><td>true</td><td>true</td><td>true</td></tr><tr><td><a href="https://docs.braincloudservers.com/learn/key-concepts/multiplayer/lobbies/#lobby-experience">brainCloud Lobby</a><br>(bitHeads)</td><td>true</td><td>true</td><td>true</td></tr><tr><td><a href="https://github.com/foxssake/noray">noray</a><br>(Netfox)</td><td>false</td><td>false</td><td>true</td></tr><tr><td><a href="https://developer.apple.com/documentation/gamekit/connecting-players-with-their-friends-in-your-game">Gamekit Friends</a><br>(Apple)</td><td>true</td><td>true</td><td>false</td></tr><tr><td>Custom Lobby<br>(your company)</td><td>true</td><td>true</td><td>true</td></tr></tbody></table>

{% hint style="warning" %}
**Lobby should not be confused with a Social Hub server** (often called "Lobby Server").
{% endhint %}

### **Social Hub**

**Social Hub** is a special dedicated game server offering a social experience, often while waiting to fill the Session with enough players to start the main game mode. Social Hubs are sometimes disabanded or filled with bots, as a fallback in case of long wait times.

Social Hubs are similar to [**Persistent Servers**](/learn/orchestration/persistence.md) which can run for extended periods of time.

### **Session**

**Session** is a short-lived and disposable entity defined by a set of parameters:

* Connected Group(s) - one or more Groups, each identified by a set of unique player IDs.
* [Deployment](/learn/orchestration/deployments.md) - a single server instance holding player connections for the session's duration.

{% hint style="info" %}
Sessions on Edgegap can utilize [managed services](/getting-started.md), a third party solution, or your custom backend.
{% endhint %}

## 🔀 Stacking Sessions

{% hint style="info" %}
Most game engines require at least 0.25 vCPU to run servers, benchmark using [Deployments](/learn/orchestration/deployments.md#container-metrics).
{% endhint %}

Custom game servers sometimes require less than the minimum [0.25 vCPU per session](/learn/orchestration/application-and-versions.md#resource-requirements):

* Lockstep Simulation games (e.g. turn-based, TCG/CCG, or strategy games).
* 1v1 Fighting Games - usually using Custom Smart Relay with cheating detection (e.g. [lightnet](https://github.com/edgegap/lightnet-unity-relay)).

This results in deployments with idle headroom, inflating your hosting cost. To reduce that headroom, try stacking multiple sessions in each deployment. This will require some server modifications.

{% hint style="warning" %}
**Stacking sessions is not recommended if your server requires 0.25 vCPU or more.** This approach adds session management complexity, which is typically provided by effortless Deployment isolation.
{% endhint %}

Session stacking brings three new challenges:

1. **Fill available deployment capacity with active sessions to reduce idle headroom.**
   1. Using [Matchmaking Backfill](/learn/matchmaking/matchmaker-in-depth.md#backfill-match) or [Server Browser](/learn/server-browser.md) to reuse empty sessions in deployments.
2. **Drain empty or near-empty deployments and migrate long running sessions.**
   1. [Stop empty deployments to reduce cost.](https://docs.edgegap.com/learn/orchestration/pages/0UXQAhtFuL0FkdoUmYTh#id-5.-deployment-stopped) For the last few long running sessions, offer players to move to another deployment to consolidate sessions and reduce your cost.
3. **Prevent an unexpected error in one session from affecting the whole deployment.**
   1. Implement multiple safety nets to catch exceptions at the session level. Partial error handling is advised, though restarting the match is often much easier with shorter sessions.

[^1]: Steam, Epic Games Store, Nintendo Store, and similar
