GameLift Latency Matchmaking With SPOT vs ON_DEMAND Instances

0

Hello all, So I have one fleet with a queue set up with two locations (us-east-1 and eu-central-1). I call StartMatchmaking and provide latencies for each region. When I use ON_DEMAND instances, the matchmaking seems to always work (i.e., a game session is created in the location with the lowest latency). But if I use SPOT instances, matchmaking does not seem to work anymore; game sessions are created in a fixed region no matter what value I put for the latencies.

Is this normal behavior?

asked 2 months ago157 views
2 Answers
1
Accepted Answer

Your observation about Spot instances not honoring latency values provided to StartMatchmaking is correct. The FlexMatch matchmaking service will try to optimize placement for On-Demand game sessions based on latency, but it does not have the same level of control over Spot instance placement.

When using Spot instances, the overall placement is determined by the queue configuration and available Spot capacity. Some key points:

Spot instances may be terminated at any time if capacity is needed, so FlexMatch cannot guarantee placing matches in a specific region even if latency is better elsewhere.

You can try listing the region with your fleet as the first destination in the queue to increase chances of matches being placed there. But FlexMatch has less control over Spot placements than On-Demand.

https://docs.aws.amazon.com/gamelift/latest/developerguide/tutorial-queues-spot.html

profile picture
EXPERT
answered 2 months ago
profile picture
EXPERT
reviewed 2 months ago
  • I see, so matchmaking with Spot instances is not reliable. But let me give you an example of what else I have observed.

    I hade two regions in my SPOT instance (us-east-1 and eu-central-1); I was always being placed in us-east-1 (region with GREATER latency). But when I removed us-east-1 from my instance, I was forced to be placed in eu-central-1, and GameLift was creating the sessions fine in eu-central-1. So with SPOT instances, it can successfully create game sessions in a certain region, but only if you force it. With multiple regions, game session locations will be chosen by Gamelift.

0

Hey OptimalGamer,

As Giovanni pointed out, FlexMatch doesn't distinguish between SPOT and ON_DEMAND; however, there are recommended best practices you can follow to balance costs while maintaining reliability without "forcing". I recommend reading through the whole article on setting up queues in GameLift's documentation (ending with the tutorial Giovanni linked), but some highlights are:

A common-place strategy is to prioritize Latency first then Cost second while having ON_DEMAND fleets to backup your SPOT fleets. This means that your players will place first in locations they have the best latency, and your SPOT fleets will be prioritized over ON_DEMAND to reduce costs as your SPOT fleet scales up to meet the demand.

It's worth noting that GameLift queues can only place into fleets that have space available, so you should look into scaling policies for your fleets to make sure you can handle increases and drops in player traffic: https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-autoscaling.html

Regards,

AWS
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions