- Newest
- Most votes
- Most comments
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
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:
- Queues provide customization for prioritizing Cost vs Latency vs hard-coded order etc: https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-design.html#queues-design-priority
- GameLift provides various best practices including recommending a backup ON_DEMAND fleet available for each location you want SPOT: https://docs.aws.amazon.com/gamelift/latest/developerguide/queues-best-practices.html
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,
Relevant content
- asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years 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.