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
  • What Are the Fleet's Policies
  • How to Create a Policy

Was this helpful?

  1. Documentation
  2. Fleet

Fleet Policy

PreviousFleetNextPolicy Filter

Last updated 2 months ago

Was this helpful?

What Are the Fleet's Policies

Policies are a set of restrictions that your fleet follows to create deployments in specific locations. Without them, your fleet will not work properly. You will need at least one policy, but you can add multiple policies to create deployments at multiple locations on a single fleet.

We will continue our fleet for the North American continent to better understand.

How to Create a Policy

Let's say we want these parameters for our policy:

  • A minimum of 3 deployments

  • A maximum of 10 deployments

  • We want our deployment to scale when 80% of the capacity is reached

  • We only want deployment in North America

With the Dashboard

Once created, you will be redirected to the detail page of your new policy.

With the API

{
  "name": "na-policy",
  "enabled": true,
  "minimum": 3,
  "maximum": 10,
  "threshold": 0.8,
  "type": "Location",
  "data": {
    "filters": [
      {
        "field": "continent",
        "filter_type": "all",
        "values": ["North America"]
      }
    ]
  }
}

Name: The name of your policy. It must be unique within the fleet.

Enabled: Whether your policy is enabled or not. As opposed to the fleets, we recommend letting it enabled by default, so you don't have to go back to enable it. The policy won't do any deployments until the fleet is enabled.

Minimum: The minimum amount of deployment that must be running at any time for this policy. It is required to be at least one otherwise the fleet policy would not make any deployments.

The minimum policy setting will ignore empty time to live of your session's configuration, ensuring that you always have at least the minimum number of deployments specified.

Maximum: The maximum amount of deployments that the policy can scale up. If left empty or null in the API, it can scale as much as needed. Be aware that with scaling comes costs, but if your game starts scaling fast, it's probably a good sign for your game.

Threshold: Refers to the point at which a new deployment should be created based on the number of session sockets used. It is a percentage value between 0.1 and 1 (e.g., 0.8 = 80%) that indicates the capacity at which the fleet should create a new deployment for a specific policy when the previous deployment reaches this threshold.

Type: The type of policy will determine what kind of JSON body will be valid in the data field. It can either be:

  • Location - The filters will be of geographical type like a city, country, continent, etc. This is the type you will most likely use.

  • Coordinates - This type allows you to input a latitude/longitude coordinates as the point where you want your deployments to be. We will try to make the deployments as close as possible to the coordinates.

Data: This field will vary depending on the type. It will be a list of filters for Location and Tag. For the Point type, it will be a dictionary with coordinates.

In the next section, we will go through every type in detail and how to create the associated `data`.

It is essential to choose the threshold value carefully to avoid over-scaling and generating unnecessary costs. A lower threshold value will result in more frequent scaling, while a higher threshold value will result in fewer scaling events. To better understand deployment/session capacity, refer to the

Tag - The filters will be based on in-house tags like infrastructure or CPU type. This is a more advanced way to filter your policy. You can get the available tags with the .

📚
API Reference
API Doc
session capacity documentation.