# Server Browser

Get started with Server Browser quickly and explore example scenarios for various genres.

Server Browser is a managed service for [Deployments](/learn/orchestration/deployments.md#match-bound) and [Persistent](/learn/orchestration/persistence.md) servers:

* **help players search and join suitable servers** based on capacity, latency, or game parameters;
* **pre-warm new servers** to serve global audiences at scale and prevent frustrating queues;
* **streamline server operations** including updates, restarts, persistence, meshing, and more.

{% hint style="success" %}
Looking to match players based on strict rules, without allowing server choice? Consider [Matchmaking](/learn/matchmaking.md).
{% endhint %}

## ✔️ Preparation

**Testing this service is entirely free, no credit card required.**

Free Tier allows up to 3 hours of runtime on our shared test cluster, after each restart.

This tutorial assumes you have already:

* [understood Edgegap’s deployment model](https://docs.edgegap.com/learn/pages/0UXQAhtFuL0FkdoUmYTh#id-1.-just-in-time-deployment-dedicated-servers),
* published your server application on Edgegap ([Unreal Engine](/unreal-engine.md), [Unity](/unity.md)),
* successfully connected from a game client to your server on Edgegap.

### Functions and Flow

<figure><img src="/files/i2b0y0S5ani1sv4p4brp" alt=""><figcaption><p>Server Browser: Flow and Hierarchy</p></figcaption></figure>

Server Browser offers two main features:

[#start-browsing](#start-browsing "mention") with Game Clients to:

* Discover and find suitable server instances, view slots, and reserve available capacity.
* Reserve seats in an instance slot, retrieve connection details, and connect to servers.
* Authenticate player connections in Deployments using [Federated Identity](#user-content-fn-1)[^1].
* Update instance slots' available capacity and/or metadata to modify discovery criteria.

[#automated-scaling](#automated-scaling "mention") (optional) with Scaling Policies to:

* Monitor available server instances, slots, capacity - per region and/or other criteria.
* Deploy Servers to increase capacity with prewarming or just-in-time scaling.
* Automate ops with special policies for demos, updates, testing, QA, tournaments, and more.

{% hint style="info" %}
After release, **your server browser will need to run 24/7** to ensure players across the world can join servers.
{% endhint %}

## ▶️ Start Browsing

Learn about server/player lifecycle and their responsibilities to ensure efficient server use.

### Authenticate

All requests must send an `Authorization`  HTTP header with your secret **Auth Token:**

<pre><code>Authorization: <a data-footnote-ref href="#user-content-fn-2">xxxxxxxx-e458-4592-b607-c2c28afd8b62</a>
</code></pre>

{% hint style="warning" %}
**Keep your tokens secret and safe! Edgegap staff will never ask you for your tokens.**
{% endhint %}

Server Browser automatically generates two types of tokens:

* **Server Token** - required for [Server API](#server-lifecycle) methods, can be [injected as app version variable](/learn/orchestration/application-and-versions.md#injected-variables).
  * Grants access to all API methods, and is handy for testing, devops, or custom orchestration.
* **Client Token** - required for [Monitor API and Seat Reservation API](#player-lifecycle) used by Game Clients.
  * We recommend storing this token in a third party secret store to make token rotation easier.

### Discover Instance

{% hint style="warning" %}
**New** [Deployments](/learn/orchestration/deployments.md) **must create a new Instance** when initialized to keep track of added capacity.
{% endhint %}

{% hint style="info" %}
See [#automated-scaling](#automated-scaling "mention") to learn about Scaling Policies and start deployments automatically.
{% endhint %}

**Required information** for each server instance includes:

* at least one Slot defined when initializing instance,
* server connection details - URL, IP, port information, and location.

**Optional custom metadata parameters** for player filtering, sorting, and browsing; for example:

* slot information - team capacity and team-specific metadata (e.g. team name),
* name and tags - customizable, unique, human-readable and searchable labels;
* compatibility data - server version or supported client versions;
* latency qualifiers - city and region identifiers, and assigned [Ping Beacons](/learn/orchestration/ping-beacons.md) details;
* game parameters - level/scene/map, game mode, difficulty, mods used;
* any other custom parameters to help players filter and find a suitable server.

{% hint style="info" %}
Metadata parameters above are just examples, you can define any number of parameters as needed.
{% endhint %}

{% hint style="success" %}
To serialize nested objects try encoding their accessor path in the key as `"object.child.property"`.
{% endhint %}

Servers may **update instance or slot metadata anytime** to modify their discoverability criteria. When updating metadata, all indexed keys must be provided with valid values (even if not modified).

**Server Instances must periodically send a keep-alive heartbeat** to verify their ongoing availability and prevent players from joining crashed or offline servers. Missing heartbeat for the configured expiration period will automatically delete instance and any pending seat reservations.

{% hint style="info" %}
See [Persistence](/learn/orchestration/persistence.md) for managing persistent world state and [Apps and Versions](/learn/orchestration/application-and-versions.md#active-caching) for faster deployments.
{% endhint %}

### Allocate Capacity

Instance and Slot capacity may be allocated in two ways, used individually or combined:

* [#auto-assigned-reservation](#auto-assigned-reservation "mention") to choose a server started with a specific scaling policy,
* [#search-and-browse](#search-and-browse "mention") to let the player define filters and browse suitable servers to pick from.

{% hint style="success" %}
We recommend getting started with [#auto-assigned-reservation](#auto-assigned-reservation "mention") as the simpler option.
{% endhint %}

#### Auto-Assigned Reservation

{% hint style="info" %}
Implement this feature if you wish to **choose server automatically**, based on regional capacity.
{% endhint %}

Players may create an auto-assigned reservation, only supplying player IDs and a scaling policy name. Server Browser will automatically find an instance with a slot offering sufficient joinable capacity and reserve seats, responding immediately with instance connection details.

If there is no suitable instance slot for this reservation, the response:

* **status code indicates whether the policy is scaling up** and more capacity will be added,
* **header `Retry-After`  indicates wait period (seconds) before retrying**, if retryable.

Once a reservation is completed, you may skip to [#connect-to-server](#connect-to-server "mention").

#### Search and Browse

{% hint style="info" %}
Implement this feature if you wish to **show users a list of servers and allow custom reservations**.
{% endhint %}

Players may list server instances and [paginate through results](#pagination) to find a server they'd like to join.

Instances and slots may be filtered and sorted with built-in parameters or [indexed metadata](#configuration):

<table><thead><tr><th width="400">Property</th><th width="140">Data Type</th><th width="105">Instance</th><th width="105">Slot</th></tr></thead><tbody><tr><td><code>request_id</code></td><td><code>string</code></td><td>✅</td><td>❌</td></tr><tr><td><code>total_joinable_seats</code>, <code>total_available_seats</code></td><td><code>int</code></td><td>✅</td><td>❌</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>❌</td><td>✅</td></tr><tr><td><code>available_seats</code>, <code>reserved_seats</code></td><td><code>int</code></td><td>❌</td><td>✅</td></tr><tr><td><code>created_at</code>, <code>updated_at</code></td><td><code>string</code></td><td>✅</td><td>✅</td></tr><tr><td><code>metadata.{index}</code> (custom)</td><td><code>string</code>, <code>int</code>, <code>float</code>, <code>bool</code></td><td>✅</td><td>✅</td></tr></tbody></table>

Available filtering operators depend on the data type of the filtered property:

<table><thead><tr><th width="125">Parameter</th><th width="135">Operators</th><th>Example Filter (based on Simple Example)</th></tr></thead><tbody><tr><td><code>string</code></td><td><p><a data-footnote-ref href="#user-content-fn-3"><code>eq</code></a>  or <a data-footnote-ref href="#user-content-fn-4"><code>ne</code></a> or </p><p><a data-footnote-ref href="#user-content-fn-5"><code>lt</code></a>  or <a data-footnote-ref href="#user-content-fn-6"><code>le</code></a> or </p><p><a data-footnote-ref href="#user-content-fn-7"><code>gt</code></a>  or <a data-footnote-ref href="#user-content-fn-8"><code>ge</code></a>  or<br><code>contains</code></p></td><td><pre><code>?$filter=metadata.custom_name contains 'my game'
and metadata.server_version le '1.1.0'
and metadata.server_version ge '1.0.0'
&#x26;$order=metadata.custom_name asc
</code></pre></td></tr><tr><td><code>int</code>, <code>float</code></td><td><p><a data-footnote-ref href="#user-content-fn-3"><code>eq</code></a>  or <a data-footnote-ref href="#user-content-fn-4"><code>ne</code></a> or </p><p><a data-footnote-ref href="#user-content-fn-5"><code>lt</code></a>  or <a data-footnote-ref href="#user-content-fn-6"><code>le</code></a> or </p><p><a data-footnote-ref href="#user-content-fn-7"><code>gt</code></a>  or <a data-footnote-ref href="#user-content-fn-8"><code>ge</code></a>  </p></td><td><pre><code>?$filter=metadata.xp_multiplier gt 1.0
&#x26;$order=metadata.xp_multiplier desc
</code></pre></td></tr><tr><td><code>bool</code></td><td><a data-footnote-ref href="#user-content-fn-3"><code>eq</code></a>  or <a data-footnote-ref href="#user-content-fn-4"><code>ne</code></a></td><td><pre><code>?$filter=metadata.allows_new_connections eq true
</code></pre></td></tr></tbody></table>

{% hint style="success" %}
Filter by regions and/or cities metadata to narrow down selection before measuring latency to servers.
{% endhint %}

{% hint style="info" %}
Learn about cursor-based [#pagination](#pagination "mention") to let users fetch more results.
{% endhint %}

#### Reserve Seats

Before joining a server, a seat reservation is required to ensure that the instance offers sufficient available capacity. Reservations can include a group of players or a solo individual.

Federated Identity: Players must provide a unique third party player ID in their reservation. Sending the same ID once they [#connect-to-server](#connect-to-server "mention") will allow the server to verify their identity.

Once a reservation is made successfully ([200 OK](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/200)) players should attempt connecting immediately. Pending **reservations expire after 30 seconds (configurable) unless confirmed** by your server.

**Reservations exceeding slot's joinable seat capacity will be automatically rejected** ([409 Conflict](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/409)). Joinable seats are any available seats which have not been reserved by other players yet.

{% hint style="info" %}
Server may forcefully change any slot's capacity, add, delete, or update any slots. **All reservations for a given slot will be removed if any pending reservations exceed new available slot capacity.**
{% endhint %}

### Connect to Server

Once a player found a suitable instance, they **retrieve required connection details from** (URL or IP, [External Port](/learn/orchestration/application-and-versions.md#port-mapping)). As soon as the seat reservation is made, **players may proceed to connect to your deployment's game server and pass their player ID**.

{% tabs %}
{% tab title="Unreal Engine" %}
To **connect from PIE (Editor)** during development and testing, press the tilde key `~`  and type `open {URL}:{port}` and wait for your editor to load the map.

{% hint style="success" %}
In case of failed connections or dark screen consult our [troubleshooting guide](/unreal-engine.md#troubleshooting-and-faq-1).
{% endhint %}
{% endtab %}

{% tab title="Unity" %}
To **connect your Unity Editor** or **game client** to your cloud deployment, input:

* **Deployment** **URL** pointing to the server's IP, usually in `NetworkManager`  component.
* **External port** mapping to the [server's internal listen port](https://docs.edgegap.com/learn/advanced-features/application-and-versions#port-mapping), usually in a Transport component.

{% hint style="success" %}
In case of connection timeout or other issues consult our [troubleshooting guide](/unity.md#troubleshooting-and-faq-4).
{% endhint %}
{% endtab %}
{% endtabs %}

To authenticate new connections, **your server must send a bulk reservation confirmation** request with all new players' IDs, receiving information in confirmation response:

* assignment of accepted player reservations to their preferred slot,
* assignment of expired player reservations to their preferred slot,
* a list of unknown player IDs.

Your **server may decide how to handle each group of players** and whether to allow or kick/ban expired or rejected users. Each of the **instance's slots must be updated immediately with the new available seat count** to ensure future reservations won't exceed slot capacity.

### Abandon Server

When players leave, your server must increase available seat capacity for the assigned slot.

{% hint style="success" %}
If your game design allows a reconnection period, your server may wait before updating slots.
{% endhint %}

Read about [Persistence](/learn/orchestration/persistence.md#recovery-objectives) to prevent frustrating persistent server rollbacks.

## 🚀 Automated Scaling

Server Browser is compatible with several different methods of autoscoring:

* **pre-warming method** - starting servers strictly with Server Browser scaling policies,
* **just-in-time method** - start through [Matchmaking](/learn/matchmaking.md) and [fill with Server Browser](#allocate-capacity),
* **custom autoscaler** - start through custom game backend and [fill with Server Browser](#allocate-capacity).

The following guide will focus on **pre-warming with Scaling Policies** as the primary method.

{% hint style="success" %}
Learn how to stop deployments in [Unreal Engine](/unreal-engine.md#stop-deployments), [Unity](/unity.md#stop-deployments), or [with API](/docs/api/dedicated-servers.md#delete-v1-self-stop-request_id-access_point_id) to manage lifecycle reliably.
{% endhint %}

### Monitor Capacity

Scaling policies continuously refresh the list of your server instances (discovered Deployments), repeating every [`monitoring_interval`](#user-content-fn-9)[^9] . Each policy requires a filter using the same [filtering syntax](#search-and-browse) as players do when searching for instances - per region, capacity, or other criteria.

Your configured [`minimum_active_instances`](#user-content-fn-10)[^10]  amount can be treated either as a:

* **fixed capacity** of deployments that you wish to keep running at all times,
* **pre-warm standby** deployment buffer to hide initialization delays.

#### Fixed Capacity

Keep a fixed amount of active servers for games with [Persistence](/learn/orchestration/persistence.md), particularly when such games offer players to provision [Persistence](/learn/orchestration/persistence.md#community-servers).

This type of policy configuration is also sometimes used for Quality Assurance, Tournaments, Closed Alphas, Publisher Demos, or other kinds of limited capacity events and operations.

{% hint style="info" %}
Scaling policy helps you automatically restart and recycle crashed servers on the fly.
{% endhint %}

#### Pre-Warm Standby

Start servers ahead of player demand if:

* you're launching a big release and expect rapid inflow of players in a short timespan,
* or server initialization requires more than 30 seconds ([not including deployment time](#user-content-fn-11)[^11]),
* or game implements meshing strategies requiring layered or circular network dependencies.

### Deploy Servers

New deployments will be started automatically when the amount of monitored server instance*s* drops below the configured minimum of active instances. All deployments are requested immediately and retried infinitely every monitoring interval after [`deployment_registration_period`](#user-content-fn-9)[^9]  elapsed.

{% hint style="warning" %}
Verify that new deployments [perform auto-discovery and create instances](#discover-instance) matching your policy filter correctly, or **your policy may loop infinitely and create large amounts of unused deployments**!&#x20;
{% endhint %}

Policies start deployments with [Private Fleets](/learn/orchestration/private-fleets.md) (with Overflow to Cloud) or directly to Cloud.

Available parameters include ([see API specification](/docs/api/dedicated-servers.md#private-fleets)):

* [**application and version**](/learn/orchestration/application-and-versions.md) - build version, resources, and other orchestration parameters,
* **users** - a single set of geographical coordinates for preferred [server placement](/learn/orchestration/deployments.md#regional-standby),
* [**private host IDs**](/learn/orchestration/private-fleets.md) - leave empty for cloud, or specify hosts within the desired region,
* [**tags**](/learn/orchestration/deployments.md#dashboard-monitoring) - tag with policy name to find deployments started with this policy later on,
* [**environment variables**](/learn/orchestration/deployments.md#custom-variables) - pass custom parameters and secrets to servers,
* [**webhooks**](/learn/orchestration/deployments.md#webhooks-and-postbacks) - notify your game backend (or matchmaker) of deployment lifecycle events,
* [**require cached locations**](/learn/orchestration/application-and-versions.md#active-caching) - if you prefer faster deployments only in cached locations.

### Example Policies

Test and modify any of these policies as you need. Most games will use multiple policies.

{% tabs %}
{% tab title="🍀 QA Pool" %}
A simple policy to keep one server deployed for testing at all times.

<pre class="language-json" data-title=""><code class="lang-json">{
  "name": "sb-qa-pool",
<strong>  <a data-footnote-ref href="#user-content-fn-12">"filter"</a>: "metadata.policy_name eq 'sb-qa-pool'",
</strong>  "deployment_request": {
    "private_host_ids": [],
    "application": <a data-footnote-ref href="#user-content-fn-13">"my-game-server"</a>,
    "version": <a data-footnote-ref href="#user-content-fn-14">"2024.01.30-16.23.00-UTC"</a>,
    "users": [
      {
        "user_type": "geo_coordinates",
        "<a data-footnote-ref href="#user-content-fn-15">user_data</a>": {
<strong>          "latitude": 41.881832,
</strong><strong>          "longitude": -87.623177
</strong>        }
      }
    ],
<strong>    "tags": ["sb-qa-pool"],
</strong>    "environment_variables": [
      {
<strong>        "key": "SB_POLICY_NAME",
</strong><strong>        "value": "sb-qa-pool",
</strong>        "is_hidden": false
      }
    ]
  },
<strong>  "minimum_active_instances": 1
</strong>}
</code></pre>

{% endtab %}

{% tab title="🌡️ Pre-Warm" %}
Start 10x deployments prior to the release in anticipation of demand. Copy for each region.

<pre class="language-json" data-title=""><code class="lang-json">{
  "name": "sb-v1.0.0-chicago",
<strong>  <a data-footnote-ref href="#user-content-fn-16">"filter"</a>: "total_joinable_seats gt 0 and metadata.policy_name eq 'sb-v1.0.0-chicago'",
</strong>  "deployment_request": {
    "private_host_ids": [],
    "application": <a data-footnote-ref href="#user-content-fn-13">"my-game-server"</a>,
    "version": <a data-footnote-ref href="#user-content-fn-14">"2024.01.30-16.23.00-UTC"</a>,
    "users": [
      {
        "user_type": "geo_coordinates",
        "<a data-footnote-ref href="#user-content-fn-15">user_data</a>": {
<strong>          "latitude": 41.881832,
</strong><strong>          "longitude": -87.623177
</strong>        }
      }
    ],
<strong>    "tags": ["sb-v1.0.0-chicago"],
</strong>    "environment_variables": [
      {
<strong>        "key": "SB_POLICY_NAME",
</strong><strong>        "value": "sb-v1.0.0-chicago",
</strong>        "is_hidden": false
      }
    ]
  },
<strong>  <a data-footnote-ref href="#user-content-fn-17">"minimum_active_instances"</a>: 10
</strong>}
</code></pre>

{% endtab %}

{% tab title="🔒 MMO" %}
Each region adds deployments as available capacity drops below a threshold.

<pre class="language-json" data-title=""><code class="lang-json">{
<strong>  "name": "sb-mmo-chicago",
</strong><strong>  <a data-footnote-ref href="#user-content-fn-18">"filter"</a>: "total_joinable_seats gt 5 and metadata.policy_name eq 'sb-mmo-chicago'",
</strong>  "deployment_request": {
<strong>    <a data-footnote-ref href="#user-content-fn-19">"private_host_ids"</a>: ["alpha-north-america-95fab093"],
</strong>    "application": <a data-footnote-ref href="#user-content-fn-13">"my-game-server"</a>,
    "version": <a data-footnote-ref href="#user-content-fn-14">"2024.01.30-16.23.00-UTC"</a>,
    "users": [
      {
        "user_type": "geo_coordinates",
        "<a data-footnote-ref href="#user-content-fn-15">user_data</a>": {
<strong>          "latitude": 41.881832,
</strong><strong>          "longitude": -87.623177
</strong>        }
      }
    ],
<strong>    "tags": ["sb-mmo-chicago"],
</strong>    "environment_variables": [
      {
<strong>        "key": "SB_POLICY_NAME",
</strong><strong>        "value": "sb-mmo-chicago",
</strong>        "is_hidden": false
      }
    ],
<strong>    <a data-footnote-ref href="#user-content-fn-20">"webhook_on_terminated"</a>: {
</strong>      "url": "https://my-webhook.com"
    }
  },
<strong>  "minimum_active_instances": 3
</strong>}
</code></pre>

{% endtab %}

{% tab title="🔑 Community" %}
One policy per server owner, passing a custom password used for server authentication.

<pre class="language-json" data-title=""><code class="lang-json">{
<strong>  "name": "sb-owner-jnjnc8mid",
</strong><strong>  <a data-footnote-ref href="#user-content-fn-21">"filter"</a>: "metadata.policy_name eq 'sb-owner-jnjnc8mid'",
</strong>  "deployment_request": {
<strong>    <a data-footnote-ref href="#user-content-fn-19">"private_host_ids"</a>: ["alpha-north-america-95fab093"],
</strong>    "application": <a data-footnote-ref href="#user-content-fn-13">"my-game-server"</a>,
    "version": <a data-footnote-ref href="#user-content-fn-14">"2024.01.30-16.23.00-UTC"</a>,
    "users": [
      {
        "user_type": "geo_coordinates",
        "<a data-footnote-ref href="#user-content-fn-15">user_data</a>": {
<strong>          "latitude": 41.881832,
</strong><strong>          "longitude": -87.623177
</strong>        }
      }
    ],
<strong>    "tags": ["community", "sb-owner-jnjnc8mid"],
</strong>    "environment_variables": [
      {
<strong>        "key": "SB_POLICY_NAME",
</strong><strong>        "value": "sb-owner-jnjnc8mid",
</strong>        "is_hidden": false
      },
      {
<strong>        "key": "SB_SERVER_PASSWORD",
</strong><strong>        "value": "password1234",
</strong>        "is_hidden": false
      }
    ],
<strong>    <a data-footnote-ref href="#user-content-fn-22">"webhook_on_ready"</a>: {
</strong>      "url": "https://my-webhook.com"
    },
<strong>    <a data-footnote-ref href="#user-content-fn-23">"webhook_on_error"</a>: {
</strong>      "url": "https://my-webhook.com"
    },
<strong>    <a data-footnote-ref href="#user-content-fn-20">"webhook_on_terminated"</a>: {
</strong>      "url": "https://my-webhook.com"
    }
  },
  "minimum_active_instances": 1
}
</code></pre>

{% endtab %}

{% tab title="❄️ Mesh Group" %}
One policy per group of servers. Game backend starts a primary node, which spawns replicas. Each node reads injected mesh group ID and search other nodes to network with.

<pre class="language-json" data-title=""><code class="lang-json">{
<strong>  "name": "sb-meshgroup-pqyt8sxcb",
</strong><strong>  <a data-footnote-ref href="#user-content-fn-12">"filter"</a>: "metadata.policy_name eq 'sb-meshgroup-pqyt8sxcb'",
</strong>  "deployment_request": {
    "private_host_ids": [],
    "application": <a data-footnote-ref href="#user-content-fn-13">"my-game-server"</a>,
    "version": <a data-footnote-ref href="#user-content-fn-14">"2024.01.30-16.23.00-UTC"</a>,
    "users": [
      {
        "user_type": "geo_coordinates",
        "<a data-footnote-ref href="#user-content-fn-15">user_data</a>": {
<strong>          "latitude": 41.881832,
</strong><strong>          "longitude": -87.623177
</strong>        }
      }
    ],
<strong>    "tags": ["sb-meshgroup-pqyt8sxcb"],
</strong>    "environment_variables": [
      {
<strong>        "key": "SB_POLICY_NAME",
</strong><strong>        "value": "sb-meshgroup-pqyt8sxcb",
</strong>        "is_hidden": false
      },
      {
<strong>        "key": "SB_MESH_GROUP_ID",
</strong><strong>        "value": "pqyt8sxcb",
</strong>        "is_hidden": false
      }
    ],
<strong>    <a data-footnote-ref href="#user-content-fn-22">"webhook_on_ready"</a>: {
</strong>      "url": "https://my-webhook.com"
    },
<strong>    <a data-footnote-ref href="#user-content-fn-24">"webhook_on_terminated"</a>: {
</strong>      "url": "https://my-webhook.com"
    }
  },
<strong>  <a data-footnote-ref href="#user-content-fn-25">"minimum_active_instances"</a>: 9
</strong>}
</code></pre>

{% endtab %}
{% endtabs %}

## ⚙️ Configuration

Server Browser API is generated from a JSON configuration specified when you create a new (or quick-restart) Server Browser. You may specify server and slot expiration, and custom metadata:

{% tabs %}
{% tab title="🍀 Simple Example" %}

<pre class="language-json" data-title="sb-simple-example-v1-0-0.json"><code class="lang-json">{
	"version": "1.0.0",
	"server_instances": {
		"expiration_period": "1m",
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {
			"policy_name": "string",
			"name": "string"
		}
	},
	"server_instance_slots": {
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {}
	},
	"seat_reservations": {
		"expiration_period": "30s"
	},
	"scaling_policies": {
		"monitoring_interval": "10s",
		"deployment_registration_period": "1m"
	}
}
</code></pre>

{% endtab %}

{% tab title="🎈 Social Games" %}

<pre class="language-json" data-title="sb-social-example-v1-0-0.json"><code class="lang-json">{
	"version": "1.0.0",
	"server_instances": {
		"expiration_period": "15s",
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {
			"policy_name": "string",
			"name": "string",
			"third_party_id": "string",
			"level": "string",
			"mode": "string",
			"difficulty": "string",
			"seed": "string",
			"max_players": "int",
			"app_version": "string",
			"location.city": "string"
		}
	},
	"server_instance_slots": {
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {
			"third_party_id": "string",
			"max_players": "int",
			"avg_latency": "int",
			"player_ids": "string"
		}
	},
	"seat_reservations": {
		"expiration_period": "30s"
	},
	"scaling_policies": {
		"monitoring_interval": "10s",
		"deployment_registration_period": "30s"
	}
}
</code></pre>

{% endtab %}

{% tab title="🤝 Cooperative Games" %}

<pre class="language-json" data-title="sb-cooperative-example-v1-0-0.json"><code class="lang-json">{
	"version": "1.0.0",
	"server_instances": {
		"expiration_period": "15s",
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {
			"policy_name": "string",
			"name": "string",
			"third_party_id": "string",
			"level": "string",
			"mode": "string",
			"difficulty": "string",
			"avg_rank": "int",
			"max_players": "int",
			"app_version": "string",
			"tags": "string",
			"match_id": "string",
			"location.city": "string"
		}
	},
	"server_instance_slots": {
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {
			"third_party_id": "string",
			"max_players": "int",
			"player_ids": "string"
		}
	},
	"seat_reservations": {
		"expiration_period": "30s"
	},
	"scaling_policies": {
		"monitoring_interval": "10s",
		"deployment_registration_period": "30s"
	}
}
</code></pre>

{% endtab %}

{% tab title="⚔️ Competitive Games" %}

<pre class="language-json" data-title="sb-competitive-example-v1-0-0.json"><code class="lang-json">{
	"version": "1.0.0",
	"server_instances": {
		"expiration_period": "15s",
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {
			"policy_name": "string",
			"name": "string",
			"third_party_id": "string",
			"avg_rank": "int",
			"max_players": "int",
			"is_ranked": "bool",
			"app_version": "string",
			"cpu_frequency": "int",
			"match_id": "string",
			"location.city": "string"
		}
	},
	"server_instance_slots": {
		"<a data-footnote-ref href="#user-content-fn-26">indices</a>": {
			"third_party_id": "string",
			"max_players": "int",
			"avg_rank": "int",
			"avg_latency": "int"
		}
	},
	"seat_reservations": {
		"expiration_period": "30s"
	},
	"scaling_policies": {
		"monitoring_interval": "10s",
		"deployment_registration_period": "15s"
	}
}
</code></pre>

{% endtab %}
{% endtabs %}

{% hint style="info" %}
For best performance, avoid specifying indices for metadata not used for filtering or sorting. Non-indexed params can be still set and read with server instance or slot details API methods, see [#api](#api "mention").
{% endhint %}

## ☁️ Hosting Cluster

Server Browser is conveniently hosted and managed 24/7 around the clock by Edgegap.

Choose a hosting option best suited for your goal:

* **Free Cluster (shared)** to test all features and explore synergies with your design,
  * shuts down after 3 hours automatically, requiring restart to continue testing.
* **Private Cluster** **(dedicated)** to ensure a stable environment for your production needs,
  * pick your region and get 24/7 support for live games to release with confidence.

### Private Cluster Tiers

We currently offer [3 private cluster tiers](https://edgegap.com/resources/pricing#managed-infrastructure) to cater to everybody’s needs:

<table><thead><tr><th width="160">Tier</th><th align="right">Hobbyist Tier</th><th align="right">Studio Tier</th><th align="right">Enterprise Tier</th></tr></thead><tbody><tr><td>Best Suited For</td><td align="right">enthusiasts,<br>solo developers</td><td align="right">commercial releases</td><td align="right">high-traffic launches</td></tr><tr><td>Resources</td><td align="right">1 vCPU + 2GB RAM</td><td align="right">6 vCPU + 12GB RAM</td><td align="right">18 vCPU + 48GB RAM</td></tr><tr><td>Redundancy</td><td align="right">1x virtual node</td><td align="right">3x virtual nodes</td><td align="right">3x virtual nodes</td></tr><tr><td>Rate Limit (req/s)</td><td align="right">200</td><td align="right">750</td><td align="right">2,000</td></tr><tr><td>Price, hourly</td><td align="right">$0.0312</td><td align="right"> $0.146</td><td align="right">$0.548</td></tr><tr><td><strong>Price, 30 days</strong><br>(nonstop usage)</td><td align="right"><strong>$22.464</strong></td><td align="right"><strong>$105.12</strong></td><td align="right"><strong>$394.56</strong></td></tr></tbody></table>

Upgrade to a private cluster with one click to benefit from highly available hosting maintained by Edgegap team with 24/7 live support for publicly released games.

Resource requirements for your instance will depend on factors:

* **number of players** - more players result in more API requests,
* **number of requests per player** - faster retries increase service load and consume resources,
* **number of servers** - more servers result in more data stored and more API requests,
* **client retry fallback logic** - retrying with jittered backoff helps spread traffic burst peaks,
* **average match duration** - shorter sessions require more frequent server browser interaction.

{% hint style="info" %}
Our clusters use cloud machines featuring AMD/Intel CPUs with clock speed 2.4 - 3.2 GHz.
{% endhint %}

## 📗 API

**Consider using our SDK for** [**Unreal Engine**](/unreal-engine/developer-tools.md) **or** [**Unity**](/unity/server-browser.md) **to get started quickly with prebuilt examples.**

Game Clients and Dedicated Servers send API requests throughout their lifecycle to Server Browser.

{% hint style="info" %}
Unity/Android - consider [using raw string interpolation](https://www.c-sharpcorner.com/article/convert-string-to-json-in-c-sharp/) to prevent code stripping of hardcoded JSONs.
{% endhint %}

{% hint style="success" %}
**Swagger Web UI**: deploying your service will generate an openAPI specification and a convenient web UI. Open the URL in your browser to view and test all API endpoints, and to review payload examples.
{% endhint %}

{% file src="/files/hwdf2pmv3teYfx1dx5vH" %}

Import API specification to [Scalar API Web Client](https://client.scalar.com/workspace/default/request/default) or [Swagger Editor](https://editor.swagger.io/) to inspect details.

### Pagination

**Server Browser provides cursor pagination to fetch filtered data incrementally in a specific order.** This approach requires sending a cursor (starting point) and a page size (number of response items) whenever fetching more results, as opposed to the traditional limit-offset pagination.

{% hint style="info" %}
Combined with our proprietary database indexing system developed for game server metadata, cursor pagination provides a fast, consistent, and flexible user experience for filtering highly dynamic data.
{% endhint %}

Our goal is for users to find a suitable server on the first page. For best experience, we recommend showing cached results for previous pages, and only refreshing results when the user clicks Search.

## 🔖 Changelog

#### Semantic Versioning

Our developer tools and managed services use official [Semantic Versioning](https://semver.org/), indicating which updates are ✅ safe (minor, patch) and which may contain ⚠️ breaking changes (major).

**Once a version is released, it will never be modified/changed**.

{% hint style="info" %}
**The latest version of server browser is `1.0.0`** . Keep an eye out for [updates and announcements](/docs/release-notes.md).
{% endhint %}

[^1]: third party player identifiers

[^2]: example value

[^3]: equals

[^4]: not equals

[^5]: lower than

[^6]: lower than or equal

[^7]: greater than

[^8]: greater than or equal

[^9]: see Configuration

[^10]: see Example Policies

[^11]: use active caching to reduce deployment times easily

[^12]: * fixed capacity
    * assumes instances supply policy name in metadata from injected variable

[^13]: replace with your own application name

[^14]: replace with your own application version

[^15]: Chicago coordinates

[^16]: * deploys when less than 10 joinable instances found
    * assumes instances supply policy name in metadata from injected variable

[^17]: we expect at least 10 deployments in the Chicago region

[^18]: * deploys when less than 3 instances with 5 or less joinable seats are found
    * assumes instances supply policy name in metadata from injected variable

[^19]: prefer private fleet if capacity available

[^20]: notify game backend when server restarts

[^21]: * does not monitor capacity
    * assumes instances supply policy name in metadata from injected variable

[^22]: notify game backend when ready

[^23]: notify game backend when deployment fails

[^24]: notify game backend when stopped

[^25]: 3x3 grid = 9 servers per world

[^26]: indices contain your custom metadata parameters used for filtering or sorting


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.edgegap.com/learn/server-browser.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
