Manual Backfill implementation always return Timeout

I am currently developing by following This workshop (Persistent GameLift HoL :: Persistent Game Server on GameLift).

I am trying to implement “Manual Backfill” using StartMatchBackfill API and StopMatchBackfill API.
And I am going to call StartMatchBackfill API on a lambda function as follows. I used Lambda Python SDK to call StartMatchmaking API.

Currently my workflow is :

  1. Client A calls StartMatchmaking API and join the game A. (min Player : 0)
            match_response = gamelift.start_matchmaking(
                 ConfigurationName='Manual-Backfill-01',
                 Players = [ { 'PlayerId' : "ClientA", 'PlayerAttributes' : {'world': {'S': worldId }, 'level': {'N': 1}} } ]
             )
  1. Client B calls StartMatchBackfill API to join the game A. It seems like :
            match_response = gamelift.start_match_backfill(
                    ConfigurationName='Manual-Backfill-01',
                    Players = [
                            {
                                'PlayerId': "ClientB",
                                'PlayerAttributes': {'world': {'S': worldId }, 'level': {'N': 1}}
                            }
                        ]
                )
  1. Responses are always Matchmaking Timedout.

Is it bug on GameLift? I searched the several topics in this forum, but I could not find Manual Backfill implementation guidelines.

If not, could you please help me to correct my code & request?

Hi @PThomas

  1. Have you by any chance tried to call start_matchmaking normally for ClientB and get matches consistently? If not, check and make sure your fleet(s) have at least 1 ACTIVE instance and 1 available process.
  2. Does your ruleset match step 10 of Configuring FlexMatch Environment :: Persistent Game Server on GameLift or have you by any chance modified the ruleset?
  3. (Unless you are already doing so) Alternatively, you can also test matchmaker in an isolated fashion, i.e. no queues/fleets to introduce extra points of failure. See Standalone flexmatch: GameLift FlexMatch integration for standalone matchmaking - Amazon GameLift

Hi, James.

  1. Is it correct status? ClientA could play the game well. But ClientB can not join the existing game session. Although there is a game session, it describes 0 in Fleet overview.

  1. I have not changed yet.

  2. Not yet. I will also check Standalone Matchmaking.

It seems like there is no active game session in GameLift overview, even though there is active game session. Is it bug in console? Or did I set something wrong?

That could potentially be a known issue on the GameLift console, the values you underlined is aggregated across all of your locations, and the update could be delayed for up to 10 seconds. If you refresh the page you might be able to see it being updated. If not, please let us know and we’ll take a look.

But ClientB can not join the existing game session

Do you mean you tried to match A and B together without using backfill, and ClientB still cannot join? I.e.

gamelift.start_matchmaking(
  ConfigurationName='Manual-Backfill-01',
  Players = [ { 'PlayerId' : "ClientA", 'PlayerAttributes' : {'world': {'S': worldId }, 'level': {'N': 1}} } ]
)
gamelift.start_matchmaking(
  ConfigurationName='Manual-Backfill-01',
  Players = [ { 'PlayerId' : "ClientB", 'PlayerAttributes' : {'world': {'S': worldId }, 'level': {'N': 1}} } ]
)

If that’s the case, could you call DescribeGameSessions with the game session ID after ClientA is matched, and see if “PlayerSessionCreationPolicy” is somehow updated to DENY_ALL? (It should be ACCEPT_ALL) DescribeGameSessions - GameLift Service

I will also check Standalone Matchmaking.

Thanks, please let us know if this helps. If it’s still not the case, I can get the GameLift team to take a look for you in our backend.

I am trying to match A and B together “using” Manual Backfill. Is this possible?

I tested DescribeGameSessions as you mentioned, but could not get “PlayerSessionCreationPolicy”.
So, it is not ACCEPT_ALL and DENY_ALL both.

Also I could check PlayerSessionCreationPolicy is Optional response through This document.

When could I get the element?

Hi @PThomas

I’m getting a GameLift engineer to look into this for you.

James

P52099310

Hi @PThomas

Can you let us know the following information so that we can investigate?

  1. matchmaking configuration
  2. aws region
  3. backfill ticket id
  4. non-backfill ticket id that you expected to match with (3)
  5. Approximate time (with timezone) of when these tickets were submited?

Thanks

Hi BrianS!

Here is the information.

Matchmaking Configuration Name : ’ Manual-Backfill-01’
AWS Region : ap-northeast-2
Ticket ID : 86af31a4-211a-48eb-9ad3-a547eea67bb0
I submitted the Manual Backfill Ticket 05:55 UTC

Thanks

Hi @PThomas,

First let me apologize for the delay in response here! As always if the issue is urgent we recommend reaching out to AWS support as sometimes forums issues can get lost in the shuffle.

Looking into the ticket you posted I see the following sequence of events;

08 Sep 2021 05:51:26,285 - StartMatchmakingRequest; Config: Manual-Backfill-01, Ticket: 86af31a4-211a-48eb-9ad3-a547eea67bb0
08 Sep 2021 05:51:26,375 - Status of ticket changes to SEARCHING
08 Sep 2021 05:51:26,578 - Match is located and ticket added
08 Sep 2021 05:51:26,587 - Status is set to PLACING (adding to the game session)
08 Sep 2021 05:51:26,686 - Ticket is set to PENDING (waiting for game session activation/ack)
08 Sep 2021 05:51:29,142 - Ticket is set to FUFILLED/COMPLETED

At this point the initial match is created. A backfill request comes in then at -
2021-09-08T05:54:36.208Z

However I see that this request fails with;
BadRequestException - Team is required for player[0].

That appears to be the only backfill request associated with the match above.

Again, my apologies that this response was delayed. Please let me know if you’ve been able to resolve the issue or if there’s stuff we can help with further!

Hi, Thanks for reply.

Could you check it is the right way to implement?

First player(retry-123) Calls -
gamelift.start_matchmaking(
ConfigurationName=‘Manual-Backfill-01’,
Players = [ { ‘PlayerId’ : playerId, ‘PlayerAttributes’ : playerAttr, ‘Team’: “world” } ]
)

After matching it, I called StartMatchBackfill API like this.

gamelift.start_match_backfill(
ConfigurationName=‘Manual-Backfill-01’,
GameSessionArn=‘GameSessionArn’,
Players = [
{
‘PlayerId’: ‘retry-123’,
‘PlayerAttributes’: playerAttr,
‘Team’: “world”
},
{
‘PlayerId’: {NEW PLAYER PLAYERID},
‘PlayerAttributes’: playerAttr,
‘Team’: “world”
}
]
)

If you just confirm whether it is the right way to implement Manual backfill, I will ask a ticket through our Solutions Architect.

Hi,
Looking at the requests, I see a few things that could be going wrong:

(1) Its not necessary to include “Team” for StartMatchmaking Request (since we don’t know what player’s team is yet before they are matched). “Team” field is only necessary for Backfill Requests (calling StartMatchBackfill API) after we already know what team the player is on.

(2)
StartMatchBackfill API should be called providing the players that are currently in the game in the request:
https://docs.aws.amazon.com/gamelift/latest/apireference/API_StartMatchBackfill.html#gamelift-StartMatchBackfill-request-Players

This API call will effectively create a new matchmaking ticket (with current players in the gameSession), that other tickets in the pool can match with.

In other words, to achieve the scenario: ClientA joins the match, ClientB joins with Backfill, you should try something like the following:

Submit Initial Matchmaking Ticket…

gamelift.start_matchmaking(
	ConfigurationName=‘Manual-Backfill-01’,
	Players = [ { ‘PlayerId’ : ClientA, ‘PlayerAttributes’ : playerAttr } ]
)

After Match is Created, Start Backfill, and Create a second matchmaking ticket…

gamelift.start_match_backfill(
	ConfigurationName=‘Manual-Backfill-01’,
	GameSessionArn=‘GameSessionArn’,
	Players = [
	{
		‘PlayerId’: ‘ClientA’,
		‘PlayerAttributes’: playerAttr,
		‘Team’: “world”
	}
	]
)

gamelift.start_matchmaking(
	ConfigurationName=‘Manual-Backfill-01’,
	Players = [ { ‘PlayerId’ : ClientB, ‘PlayerAttributes’ : playerAttr } ]
)

The expected result is that the ClientB (the 2nd player) will be matched into the GameSession.

Thanks!

I found it worked pretty well.

It was my mistake to include ClientB at the StartMatchBackfill API, and call it instead of StartMatchmaking.

You saved my time.