FlexMatch long matchmaking time

We are using the following matchmaking ruleset with a standalone configuration

    "name": "MatchmakingRuleset",
    "ruleLanguageVersion": "1.0",
    "algorithm": {
        "backfillPriority": "high",
        "batchingPreference": "random",
        "strategy": "exhaustiveSearch"
    "playerAttributes": [
            "name": "tournamentDefinitionID",
            "type": "string"
            "name": "skill",
            "type": "number",
            "default": 0
    "teams": [
            "name": "player",
            "minPlayers": 0,
            "maxPlayers": 1,
            "quantity": 4
    "rules": [
            "name": "SameTournament",
            "description": "Match players to play in the same tournament type",
            "type": "comparison",
            "operation": "=",
            "measurements": ["flatten(teams[*].players.attributes[tournamentDefinitionID])"]

Since minPlayers is 0 for all teams, that means that when there are no other players matchmaking at the moment and no backfilling tickets, players can get a successful match with just their own ticket, in which event we create a new game, and the player enters this game alone. We then call startMatchBackfill with the same configuration and repeat the process until the game is full.

This mean that at any given moment, any submitted ticket “should” always result in a MatchmakingSucceeded callback, so theoretically there should be no waiting for matchmaking.

For some reason we are experiencing wait times of 5-10 seconds from when we call startMatchmaking until our matchmaking event listener lambda is called (wired through EventBridge), is there any way to speed this up? Is this a technical constraint? Is FlexMatch waiting for more tickets to enter the pool, and is there a way to configure this?

Hello, did you root out the possibility of lambda cold start? Or can you provide some ticket ids & rough time & region so we can take a closer look?

Had a very busy couple of weeks here, thanks for responding and we’ll appreciate if you’ll take a look.

Ticket ID:
unix seconds of startMatchmaking returned success
our lambda was invoked by event bridge for “MatchmakingSearching” and “MatchmakingSuccess” at unix seconds

Regarding the possibility of a lambda cold start, I’m not seeing why a cold start would take 8 seconds in our case. Also, we can have a ticket take this amount of time followed by multiple tickets that take this amount of time. Also there are no long running / network operations happening in the matchmaking event listener’s global scope.

Just tried using SNS → SQS → Lambda for matchmaking notifications with similar results. Always a delay of at least about 5 seconds before receiving even the first “MatchmakingSearching” event after calling startMatchmaking.

Hey @zakyg, thanks for the info. I’ve created an internal ticket for us to investigate this issue.


1 Like