Gen2 Matchmaker
๐ Introductionโ
Our Matchmaker Gen2 is a managed service that uses your own rules to find the optimal group of teammates and opponents in seconds, for any player. Get started within 5 minutes, and test the entire feature set for free. Upgrade when you're ready to a private dedicated cluster with enhanced security. Native integration with Edgegap Deployments delivers best-in-class ping no matter where your players are located.
Try out Gen2 now! Free Tier allows up to 3 hours of runtime on our shared test cluster. Need more time? Simply restart your matchmaker and continue your integration test.
Legacy Managed matchmaker will be deprecated on Nov 27th 2024, but itโs still availableย here. Weโll post an updated offering for our Advanced and Legacy Managed matchmakers soon.
Disclaimer: As this is an Early Access release, some details are subject to change. We will employ our best efforts to follow your needs, and to minimize breaking changes.
This tutorial will help you learn how to:
- create a free/dedicated, customizable Gen2 matchmaker,
- deploy a low-latency Edgegap server using tickets,
- integrate ticket APIs in your game project,
- speed-up matchmaking and improve match quality,
- debug and troubleshoot common issues.
Before we get started, this tutorial assumes you have already:
- understood Edgegapโs โjust in timeโ deployment model,
- uploaded and configured your server application on Edgegap,
- successfully connected from a game client to your server on Edgegap.
If you need help with any of the above, please reach out to us over Discord. For urgent matters related to live games, we provide 24/7 support through our โRequest Helpโ feature (lifesaver icon).
There are three main components to each matchmaker:
- โ๏ธ Hosting Cluster - underlying server infrastructure, fully managed and operated by Edgegap.
- ๐ Configuration - set of rules and settings that define how the matchmaker will operate. Each matchmaker version may require a different configuration definition.
- ๐ Service Instance - the 24/7 live matchmaking service running on the Cluster, using Configuration to match players together and produce deployment assignments.
โ๏ธ Hosting Clusterโ
During this tutorial we will only use our Free Tier, which allows up to 3 hours of runtime on our shared test cluster. Need more time? Simply restart your matchmaker and continue your integration test.
If you wish to upgrade to a private cluster later, you may duplicate your matchmaker in 1 click. Your estimated monthly cluster price will be displayed before you deploy your private matchmaker.
If youโre unsure what cluster size you need, contact us for help over email or Discord.
๐ Configurationโ
The basis for every matchmaker is a JSON Configuration. To make testing new rules easier, our dashboard UI will validate the config upon upload.
๐ Simple Exampleโ
If you prefer building from scratch, you may try extending our minimal configuration required to start your matchmaker:
{
"version": "0.2.3",
"max_deployment_retry_count": 3,
"profiles": {
"simple-example": {
"application": {
"name": "myapp",
"version": "demo-app-2460c4"
},
"rules": {
"initial": {
"match_size": {
"type": "player_count",
"attributes": {
"team_count": 1,
"team_size": 2
}
},
"beacons": {
"type": "latencies",
"attributes": {
"difference": 50,
"max_latency": 250
}
}
},
"expansions": {}
}
}
}
}
Please input your own name
and version
in the application
parameter of your config. Find the latest matchmaker version here.
๐ Advanced Exampleโ
To get you started faster, weโve also prepared an advanced example demonstrating all of the matchmakerโs rules and capabilities:
Advanced Matchmaker Example
{
"version": "0.2.3",
"max_deployment_retry_count": 3,
"profiles": {
"advanced-example": {
"application": {
"name": "myapp",
"version": "demo-app-2460c4"
},
"rules": {
"initial": {
"match_size": {
"type": "player_count",
"attributes": {
"team_count": 1,
"team_size": 4
}
},
"elo_rating": {
"type": "number_difference",
"attributes": {
"max_difference": 50
}
},
"selected_game_mode": {
"type": "string_equality"
},
"selected_map": {
"type": "intersection",
"attributes": {
"overlap": 1
}
},
"selected_region": {
"type": "intersection",
"attributes": {
"overlap": 1
}
},
"beacons": {
"type": "latencies",
"attributes": {
"difference": 50,
"max_latency": 80
}
}
},
"expansions": {
"5": {
"elo_rating": {
"max_difference": 100
}
},
"10": {
"elo_rating": {
"max_difference": 200
},
"beacons": {
"difference": 100,
"max_latency": 250
}
},
"20": {
"match_size": {
"team_count": 1,
"team_size": 3
}
},
"30": {
"match_size": {
"team_count": 1,
"team_size": 2
}
},
"60": {
"match_size": {
"team_count": 1,
"team_size": 1
}
}
}
}
}
}
}
Please input your own name
and version
in the application
parameter of your config. Find the latest matchmaker version here.
๐ช Matchmaking Profilesโ
Profiles represent entirely separated matchmaking queues, only sharing the same matchmaker version. You can configure any number of profiles for your matchmakers, though splitting up your player base will result in longer queue times for your players.
Some game modes may require higher vCPU / RAM, especially if they support a higher number of players. To account for the increase, you may define a separate profile for such game mode, linked to an app version with a higher resource allocation.
๐ฆ Application and Versionsโ
Each matchmaker profile points to an exact version of an application in your Edgegap organization. Make sure to clearly distinguish between development, testing, and production environments in matchmaker profiles to prevent accidentally releasing a version which is not production ready.
You may create multiple matchmaker profiles with different app versions to test in a bigger team.
Gen2 only supports Default session type at the moment. Stay tuned for updates on support of Seat and Match session types.
โ๏ธ Matchmaking Rulesโ
Every ticket joins matchmaking queue based on initial
rules defined for their chosen profile.
๐ Rulesโ
Each entry in profile at path .rules.initial
represents a rule, where:
- key is a string value to name the rule however you prefer; e.g.
match_size
, and - value is an object defining the type and attributes of the rule, adhering to our standard ruleset.
- Rule names (e.g.
match_size
) are unique identifiers. - Operators
player_count
andlatencies
may only be used once per profile. - See ๐๏ธ Create a Ticket for an example of mapping ticket attributes to rules.
โ
Operators (rule type
)โ
All rules have to be met simultaneously to initiate assignment. You may match using operators:
player_count
is a special rule defining how many players need to match to initiate assignment,
This operator is required and may only be defined once in your initial configuration rule set.
To support multiple teams, increase team_count
value. Total number of players is calculated as product of team size and team count, e.g. for "team_count": 2
and "team_size": 5
, a total of 10 players is required to initiate assignment.
string_equality
only matches players with the exact same value, case sensitively.
Our example selected_game_mode
rule:
- Alice (โFree For Allโ) and Bob (โFree For Allโ) will match; A=B,
- Charlie (โCapture The Flagโ) and Dave (โFree For Allโ) will not match; Aโ B,
- Erin (โCapture The Flagโ) and Frank (โcapture the flagโ) will not match; Aโ B.
number_difference
matches players within the absolute numerical difference from each other,
Our example elo_rating
rule above with "max_difference": 50
initially:
- Alice (42) and Bob (90) will match; | A-B |=48
elo_rating
points, - Charlie (40) and Dave (91) will not match; | C-D |=51
elo_rating
points.
intersection
matches tickets if a given minimum of values from arrays supplied by both players match, case sensitively,
Our example selected_region
rule above with "overlap": 1
:
- Alice [โNAโ,โEUโ] and Bob [โEUโ,โAPACโ] will match; A โฉ B = {โEUโ},
- Charlie [โNAโ] and Dave [โEUโ] will not match; C โฉ D = {}.
latencies
is a special rule matching players within an absolute difference in ping values, from nearest Location Beacons,- this presents a โsoftโ solution to splitting your player base, enabling matching with neighboring regions, especially improving match speed for less populated regions,
max_latency
should be specified to discard locations above a given threshold,
Our example beacons
rule above with "difference": 50, "max_latency": 250
initially:
- Alice and Bob will match, since Beijing is discarded (>250) and the rest is within | A-B | < 50:
- Alice {Montreal: 12.3, Newark: 45.6, Dallas: 59.9, Beijing: 264.4}; and
- Bob {Montreal: 27.3, Newark: 32.4, Dallas: 23.1, Beijing: 252.2}.
- Charlie and Dave will not match, since | C-D | > 50 for Dallas Beacon:
- Alice {Montreal: 5.7 Newark: 44.2, Dallas: 59.5, Beijing: 263.2}; and
- Bob {Montreal: 57.8, Newark: 32.0, Dallas: 24.2, Beijing: 272.3}.
Learn more about how to compute and supply latency values in section ๐ผ Latency Measurement.
An example ticket + Beacons API specification are generated after releasing your matchmaker, see ๐ Matchmaking API.
โฉ Rule Expansionโ
Optionally, expansions
can be defined to modify each ruleโs attributes at time intervals since ticket creation, effectively expanding the pool of players which can be matched, speeding up queue times.
In the example above, we expand the pool by modifying attributes after:
- 5 seconds spent in queue:
elo_rating
difference of100
points is now accepted,
- 10 seconds spent in queue:
elo_rating
difference of200
points is now accepted,latency
difference of100
points is now accepted,latency
maximum of250
points is now accepted,
- 20 seconds spent in queue:
match_size
of3
players is now accepted,
- 30 seconds spent in queue:
match_size
of2
players is now accepted,
- 60 seconds spent in queue:
match_size
of1
players is now accepted- the match starts automatically.
Updates of the same ruleโs attribute will overwrite previous values during expansion.
โซ Semantic Versioningโ
Our matchmaker uses the official Semantic Versioning guidelines. Each configuration JSON is tied to a specific version of the matchmaker. Matchmaker version dictates which rules and settings are available in your configuration and API. Once a version is released, it will never change. Your configuration file will be validated depending on matchmaker version used, make sure your rules are matching the matchmaker versionโs capabilities.
The latest version of Gen2 matchmaker as of 8th October 2024 is 0.2.3
. All examples on this page are up to date. Keep an eye out for end of support notices for your matchmaker version. See also ๐ Rolling Updates & AB Tests.
Early Access - Gen2 is in Early Access as stated by semantic versioning guidelines, and indicated by version 0.x.x
. Gen2 is not production ready yet and may receive breaking changes before 1.0.0
. Please update your Matchmaker version frequently.
๐ซ Player Ticketsโ
Each player creates tickets to join the matchmaking queue. Tickets are compared and if criteria defined in the ๐ Configuration is met, a deployment will be assigned, and players may establish connection with game server.
๐ Matchmaking Processโ
The matchmaking process can be summarized in 3 simple steps:
- Player creates a ticket,
- Player repeatedly reads their ticket every second; looking for matches,
- Ticket has been matched (no visible change for player yet),
- A game server is assigned to each matched ticket,
- Players read the assignment (URL & port) from their tickets,
- Players initiate connection to game server (end of sequence).
- Ticket has been matched (no visible change for player yet),
- Player leaves the queue / exits the game
- Player deletes their ticket,
- Player stops reading their ticket status (end of sequence).
If players experiences any issues, or a long queue time, they may attempt deleting their current ticket and restarting the process by creating a new ticket.
If the player has been matched and assigned a game server, their ticket will be deleted automatically.
๐ Matchmaking APIโ
Send HTTP requests from your game client to your newly created matchmaker to manage player tickets. See our examples for each ๐ Configuration below.
Swagger Web UI: deploying a matchmaker will generate an openapi specification and a convenient web UI. Open the URL in your browser to view all API paths and request/response examples.
๐๏ธ Create a Ticketโ
Each ticket represents one player in matchmaking queue, and each rule requires a corresponding value (depending on operator) to be included when creating the ticket.
-
Server-to-Server: when calling from your backend service instead of game client, add request header
Player-Ip
with playerโs public IP address to take full advantage of our latency optimization. Find out playerโs public IP using ipify service, free of charge. -
Auth Token: to authenticate, clients should send HTTP header
Authorization: ee427fe4-e458-4592-b607-c2c28afd8b62
, find your secret token on your matchmaker page. Do not share plain text secret tokens with users outside your organization!
Caution when copy-pasting request constructor code. Specification may differ depending on your configuration and matchmaker version.
๐ Simple Ticketโ
To create a valid ticket with the ๐ Simple Example, your request body may look like this:
- JSON (web)
- C# (Unity)
- C++ (Unreal Engine)
{
"profile": "simple-example",
"attributes": {
"beacons": {
"Montreal": 12.3,
"Newark": 45.6,
"Dallas": 59.9
}
}
}
using Newtonsoft.Json;
// Constructing the JSON object
JObject json = new JObject(
new JProperty("profile", "simple-example"),
new JProperty("attributes", new JObject(
new JProperty("beacons", new JObject(
new JProperty("Montreal", 12.3),
new JProperty("Newark", 45.6),
new JProperty("Dallas", 59.9)
))
))
);
// Printing the constructed JSON
Debug.Log(json.ToString());
Consider using Edgegap Integration Kit by Betide Studio to simplify integration with Blueprints.
In Unreal Editor
- Right click in the Content Browser and select
New C++ Class
. - Choose
None
as the parent class, then clickNext
. - Name the class
AdvancedExampleJsonBuilder
and clickCreate Class
.
In SimpleExampleJsonBuilder.h
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "AdvancedExampleJsonBuilder.generated.h"
UCLASS()
class EDGEGAP_GEN2 USimpleExampleJsonBuilder : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "EDGEGAP_GEN2")
static FString ConstructSimpleExampleJson();
};
In SimpleExampleJsonBuilder.cpp
#include "SimpleExampleJsonBuilder.h"
#include "Dom/JsonObject.h"
#include "Serialization/JsonWriter.h"
#include "Serialization/JsonSerializer.h"
FString USimpleExampleJsonBuilder::ConstructSimpleExampleJson()
{
// Create the root object
TSharedPtr<FJsonObject> JsonObject = MakeShareable(new FJsonObject());
// Add the "profile" field
JsonObject->SetStringField(TEXT("profile"), TEXT("simple-example"));
// Create an "attributes" JSON Object
TSharedPtr<FJsonObject> AttributesObject = MakeShareable(new FJsonObject());
// Create a "beacons" JSON Object and add the key-value pairs
TSharedPtr<FJsonObject> BeaconsObject = MakeShareable(new FJsonObject());
BeaconsObject->SetNumberField(TEXT("Montreal"), 12.3);
BeaconsObject->SetNumberField(TEXT("Newark"), 45.6);
BeaconsObject->SetNumberField(TEXT("Dallas"), 59.9);
// Add "beacons" JSON Object to the "attributes" JSON Object
AttributesObject->SetObjectField(TEXT("beacons"), BeaconsObject);
// Add "attributes" JSON Object to the main JSON Object
JsonObject->SetObjectField(TEXT("attributes"), AttributesObject);
// Serialize JSON Object to string
FString OutputString;
TSharedRef<TJsonWriter<>> Writer = TJsonWriterFactory<>::Create(&OutputString);
FJsonSerializer::Serialize(JsonObject.ToSharedRef(), Writer);
return OutputString;
}
๐ Advanced Ticketโ
To create a valid ticket with the ๐ Advanced Example, the request body may look like this:
- JSON (web)
- C# (Unity)
- C++ (Unreal Engine)
{
"profile": "advanced-example",
"attributes": {
"elo_rating": 1337,
"beacons": {
"Montreal": 12.3,
"Newark": 45.6,
"Dallas": 59.9
},
"selected_game_mode": "quickplay",
"selected_map": ["Dust II", "Airport", "Bank Vault"],
"selected_region": ["North America", "Europe"]
}
}
// Construct the JSON using JObject
JObject json = new JObject(
new JProperty("profile", "advanced-example"),
new JProperty("attributes",
new JObject(
new JProperty("elo_rating", 1337),
new JProperty("beacons",
new JObject(
new JProperty("Montreal", 12.3),
new JProperty("Newark", 45.6),
new JProperty("Dallas", 59.9)
)
),
new JProperty("selected_game_mode", "quickplay"),
new JProperty("selected_map",
new JArray("Dust II", "Airport", "Bank Vault")
),
new JProperty("selected_region",
new JArray("North America", "Europe")
)
)
)
);
// Print the JSON to the console
Debug.Log(json.ToString());
Consider using Edgegap Integration Kit by Betide Studio to simplify integration with Blueprints.
In Unreal Editor
- Right click in the Content Browser and select
New C++ Class
. - Choose
None
as the parent class, then clickNext
. - Name the class
AdvancedExampleJsonBuilder
and clickCreate Class
.
In AdvancedExampleJsonBuilder.h
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "AdvancedExampleJsonBuilder.generated.h"
UCLASS()
class EDGEGAP_GEN2 UAdvancedExampleJsonBuilder : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, Category = "JSON")
static FString ConstructAdvancedExampleJson();
};
In AdvancedExampleJsonBuilder.cpp
#include "AdvancedExampleJsonBuilder.h"
#include "Dom/JsonObject.h"
#include "Serialization/JsonWriter.h"
#include "Serialization/JsonSerializer.h"
FString UAdvancedExampleJsonBuilder::ConstructAdvancedExampleJson()
{
// Create the root object
TSharedPtr<FJsonObject> RootObject = MakeShareable(new FJsonObject());
// Add profile attribute
RootObject->SetStringField(TEXT("profile"), TEXT("advanced-example"));
// Create attributes object
TSharedPtr<FJsonObject> AttributesObject = MakeShareable(new FJsonObject());
// Add elo_rating attribute
AttributesObject->SetNumberField(TEXT("elo_rating"), 1337);
// Create beacons object
TSharedPtr<FJsonObject> BeaconsObject = MakeShareable(new FJsonObject());
BeaconsObject->SetNumberField(TEXT("Montreal"), 12.3);
BeaconsObject->SetNumberField(TEXT("Newark"), 45.6);
BeaconsObject->SetNumberField(TEXT("Dallas"), 59.9);
// Add beacons to attributes
AttributesObject->SetObjectField(TEXT("beacons"), BeaconsObject);
// Add selected_game_mode attribute
AttributesObject->SetStringField(TEXT("selected_game_mode"), TEXT("quickplay"));
// Add selected_map attribute
TArray<TSharedPtr<FJsonValue>> SelectedMapArray;
SelectedMapArray.Add(MakeShareable(new FJsonValueString(TEXT("Dust II"))));
SelectedMapArray.Add(MakeShareable(new FJsonValueString(TEXT("Airport"))));
SelectedMapArray.Add(MakeShareable(new FJsonValueString(TEXT("Bank Vault"))));
AttributesObject->SetArrayField(TEXT("selected_map"), SelectedMapArray);
// Add selected_region attribute
TArray<TSharedPtr<FJsonValue>> SelectedRegionArray;
SelectedRegionArray.Add(MakeShareable(new FJsonValueString(TEXT("North America"))));
SelectedRegionArray.Add(MakeShareable(new FJsonValueString(TEXT("Europe"))));
AttributesObject->SetArrayField(TEXT("selected_region"), SelectedRegionArray);
// Add attributes to root object
RootObject->SetObjectField(TEXT("attributes"), AttributesObject);
// Serialize the JSON object to a string
FString OutputString;
TSharedRef<TJsonWriter<>> Writer = TJsonWriterFactory<>::Create(&OutputString);
FJsonSerializer::Serialize(RootObject.ToSharedRef(), Writer);
return OutputString;
}
๐งพ Ticket Receipt and IDโ
Once the ticket is created, you will receive a ticket ID as a receipt, used to check the status of your ticket and connect your players once theyโve been matched and the server is assigned:
- JSON (web)
- C# (Unity)
- C++ (Unreal Engine)
{
"id": "cqg0bg550h7uujd77khg",
"profile": "example",
"assignment": null,
"created_at": "2024-08-20T13:38:08.251393+00:00"
}
Coming soon!
Coming soon!
The ticket receipt has the same exact structure for both Simple and Advanced Configuration.
๐ผ Latency Measurementโ
To compute values for your latencies
operator (beacons
rule in our example) your client should:
- fetch a list of all Location Beacons from your matchmakers Beacons API,
- send a TCP or a UDP ping 3x to each of the beacons (typically ~ 10 beacons),
- submit the average (mean) value for each beacon.
Consider using Edgegap Integration Kit by Betide Studio to simplify integration with Unreal Engine Blueprints. Automation for Unity and C# is coming soon!
Ticket keys for your latencies
object are fully customizable, you may provide city
, continent
, administrative_division
from Beacons API or even your own custom values if needed.
๐ Get Ticket Statusโ
Once a ticket is created, the player will need to check itโs status every second. As soon as a match is made and the server is assigned by Edgegap, your ticket response will change to include:
- JSON (web)
- C# (Unity)
- C++ (Unreal Engine)
{
"id": "cqg0bg550h7uujd77khg",
"profile": "example",
"assignment": {
"fqdn": "cd28e6c66554.pr.edgegap.net",
"public_ip": "192.168.2.14",
"ports": {
"game": {
"internal": 7777,
"external": 51123,
"link": "cd28e6c66554.pr.edgegap.net:51123",
"protocol": "UDP"
},
"web": {
"internal": 8888,
"external": 51456,
"link": "cd28e6c66554.pr.edgegap.net:51456",
"protocol": "TCP"
}
},
"location": {
"city": "Montreal",
"country": "Canada",
"continent": "North America",
"administrative_division": "Quebec",
"timezone": "America/Toronto"
}
},
"created_at": "2024-08-20T13:38:08.251393+00:00"
}
Coming soon!
:::tip
Consider using [Edgegap Integration Kit by Betide Studio](https://egik.betide.studio/matchmaking/gameside#example-blueprint-workflow) to simplify integration with Blueprints.
:::
Your port values may differ, find details in your App version or Deployment pages on dashboard.
Either one of fqdn
or public_ip
values (+external port) may be used to establish connection.
๐ Injected Environment Variablesโ
Your server might need to know some details about the connecting players. Attributes of all tickets, resolved equality, intersection values, and more values are injected as environment variables to your Deployment.
๐ Advanced Example
{
"MM_MATCH_PROFILE": "advanced-example",
"MM_MATCH_ID": "advanced-example-2024-09-28T19:40:15.5060333Z-0",
"MM_EQUALITY": {
"selected_game_mode": ["quickplay"]
},
"MM_INTERSECTION": {
"selected_map": ["Airport"],
"selected_region": ["North America"]
},
"MM_TICKET_IDS": ["crs5n05becfc73ar62ag"],
"MM_TICKET_crs5n05becfc73ar62ag": {
"public_ip": "142.170.86.173",
"attributes": {
"beacons": [{
"Montreal": 12.3,
"Toronto": 45.6,
"Quebec": 59.9
}],
"elo_rating": ["1337"],
"profile": ["advanced-example"],
"player_ip": ["142.170.86.173"],
"selected_game_mode": ["quickplay"],
"selected_map": ["Dust II", "Airport", "Bank Vault"],
"selected_region": ["North America", "Europe"]
}
}
}
Map players to tickets - players should send their ticket ID via a Remote Procedure Call (RPC) to server when they connect.
Known bug - profile
key in injected variables is using outdated naming game_profile
, we're working on a fix!
๐ต๏ธ Inspect API (Coming Soon)โ
Our matchmaker offers a vast set of capabilities, adding complexity to the matchmaking process. The changes you make to your configuration and the impact on your players will be more predictable if you run tests on your matchmaker, using our Inspect API:
- Pause and Resume ticket assignments to preview the match suggestions step by step. While Paused, you may use all ticket APIs fully, they simply wonโt start new deployments, so you will no longer need to remove deployments spawned during your testing sessions.
- List and Delete all tickets to understand and reset your matchmaker state reliably anytime.
- List match proposals for live tickets to fine tune your ruleset and gain more control.
Inspect API has been temporarily disabled due to a bug. Weโre working on a patch and will post an announcement in our Community Discord, and in our web changelog when access is restored.
๐ฅ Backfill - Replace Leavers (Coming Soon)โ
Inform the matchmaker that players left a deployment, and we'll try to find new players to replacem them and join the game in progress. Stay tuned for updates!
โ Join as Group (Coming Soon)โ
Bring your whole group/party to the matchmaking process, we'll make sure to balance the teams (if enabled). Stay tuned for updates!
๐ Rolling Updates & AB Testsโ
Keeping track of compatibility between server and client versions can get confusing. Here are our recommendations for reliable releases for new updates, preventing downtime or compatibility issues.
We strongly recommend creating a separate matchmaker instance for your dev & production environments.
To run an AB test or a Multivariate test, follow procedures below. Once your test concludes, disable any variants that you found underperforming, keeping the winner. ๐
- Your matchmaker URL will always remain the same after restarting, to make testing easier.
- We recommend the blue/green strategy for update releases. Learn more below.
๐ Before Going Liveโ
To prepare for zero-downtime updates we recommend creating at least 3x copies of your matchmaking profile ahead of time, for example green
, blue
and orange
. Each game client version will create tickets for one of these, rotating after each update.
Each profile can point to a different app version. App versions serve as aliases for specific server image tags, removing the need to restart your matchmaker when rolling out a new server version.
๐ Client + Server Updateโ
This section assumes youโve completed ๐ Before Going Live. Letโs assume that live game clients (c1
) are currently connecting to profile green
, pointing to app version green
linked with image tag v1.1.0
. We also assume youโve previously created profile blue
pointing to app version blue
linked with an older image tag which is no longer used (e.g. v1.0.2
).
In order to release game client + server updates, you may follow procedure:
- Prepare new server app version (
v1.2.0
) on Edgegap:- push a new image tag to your container registry (
v1.2.0
), - create new app version (
v1.2.0
), - optionally enable caching for new app version (
v1.2.0
) in preparation, - wait for cache percentage to get to 80% or higher,
- push a new image tag to your container registry (
- Perform any dev tests by deploying your new app version (
v1.2.0
) through our dashboard- connect your game engineโs Editor to the provided URL + external port,
- Update unused profile
blue
to link to your new image tag (v1.2.0
), - Update your new game client (
c2
) to use the new profile (blue
) when creating tickets,- change the base URL and Authorization token to production matchmaker values,
- Perform QA tests and final verifications of your new game client (
c2
),- if you find and resolve any issues, repeat process from the beginning,
- Release your new game client update (
c2
) on distribution platforms, - Allow time for new game client (
c2
) to distribute to player devices (typically up to 3-7 days),- monitor outdated game clients (
c1
) by filtering deployments with app version (green
) in our dashboard,
- monitor outdated game clients (
- Perform cleanup of unused resources in your Edgegap account:
- delete app version
v1.2.0
as itโs no longer used for dev tests, - delete image tag
v1.1.0
to free up Container Registry capacity since update is completed.
- delete app version
For your next update, increase version numbers and swap green
and blue
keywords in the guide.
โก Server Hotfixโ
This section assumes youโve completed ๐ Before Going Live Letโs assume that live game clients (c1
) are currently connecting to profile green
, pointing to app version green
linked with image tag v1.1.0
.
To release a server patch without requiring a game client update, you may:
- Prepare new server app version (
v1.2.0
) on Edgegap:- push a new image tag to your container registry (
v1.2.0
), - create new app version (
v1.2.0
), - optionally enable caching for new app version (
v1.2.0
) in preparation, - wait for cache percentage to get to 80% or higher,
- push a new image tag to your container registry (
- Perform tests and verifications by deploying your new app version (
v1.2.0
) through our dashboard- connect your game engineโs Editor to the provided URL + external port,
- if you find and resolve any issues, repeat process from step 1,
- Update currently used profile
green
to link to your new image tag (v1.2.0
),- new matches will automatically initiate assignment with the updated tag (
v1.2.0
),
- new matches will automatically initiate assignment with the updated tag (
- Perform cleanup of unused resources in your Edgegap account:
- delete app version
v1.2.0
as itโs no longer used for dev tests, - delete image tag
v1.1.0
to free up Container Registry capacity since update is completed.
- delete app version
๐ฃ๏ธ Support and Future Updatesโ
Our priority is your success. If you feel strongly that some features need to be adjusted, some critical features are missing for you, or would express any thoughts, please reach out in our Community Discord.
โ Legacy Managed and Advanced Matchmakersโ
Legacy Managed and Advanced matchmakers will be deprecated on November 27th 2024. If youโre using either one and need help upgrading, please reach out to us at your earliest convenience.
Using our Managed matchmaker? Consider upgrading to Gen2 before end of support (deprecation).
Using our Advanced matchmaker? Consider upgrading to Gen2. Missing features? There might be a custom solution, please contact us.
๐จ Troubleshootingโ
Why canโt I start a second deployment on my account?
- You may only run 1 concurrent deployment in Free Tier. Please consider upgrading to paid tier for unlimited deployments.
Why did my matchmaker turned off automatically after 3 hours?
- Matchmakers in Free Tier are intended for initial tests and are automatically turned off after 3 hours. To continue testing you may simply restart your matchmaker from our dashboard. Please consider upgrading to paid tier for unliminted runtime.
Why am I getting assignment/deployment at random times, disregarding
player_count
?
- You or another team member may have created tickets during a previous testing session which were not assigned. Please use Inspect API to delete all tickets and reset your matchmakerโs state, or restart your matchmaker entirely using our dashboard.
Why am I getting errors when trying to create a new matchmaker using my configuration file?
- Please read the error, itโs possible youโve misspelled an identifier, rule, or an operator.
- Use JSONLint to validate your JSON formatting, you may have missed a comma or a bracket.
- Reach out over our Community Discord for help, weโll be happy to assist. ๐
My matchmaker shows an error, what should I do?
- If this is a development or a testing instance, try restarting your matchmaker first.
- Please report any issues through our Community Discord or in case of urgency create a support request through our dashboard page (lifesaver icon in the bottom right corner, โRequest Helpโ).