Best practices for Amazon GameLift game session queues
Here are some best practices that can help you build effective game session queues for game session placement.
Best practices for queues with any fleet type
A queue contains a list of fleet destinations where new game sessions can be placed. Each fleet can have instances deployed in multiple geographic locations. When choosing a placement, the queue selects a combination of a fleet and a fleet location. You provide a set of priorities for the queue to use when choosing a placement.
Consider the following guidelines and best practices:
-
Add fleets in locations that cover your players. You can add fleets and aliases in any available location. Location is important if you're making placements based on reported player latency.
-
Use aliases for all fleets. Assign an alias to each fleet in a queue, and use the alias names when setting destinations in your queue.
-
Use the same or a similar game build or script for all fleets. The queue might put players into game sessions on any fleet in the queue. Players must be able to play in any game session on any fleet.
-
Create fleets in at least two locations. By having game servers hosted in at least one other location, you mitigate the impact of Regional outages on your players. You can keep your backup fleets scaled down, and use auto scaling to increase capacity if usage increases.
-
Prioritize your game session placement. A queue prioritizes placement choices based on several elements, including destination list order.
-
Create your queue in the same location as your client service. By putting your queue in a location near your client service, you can minimize communication latency.
-
Use fleets with multiple locations. Use the queue filter configuration to prevent the queue from placing game sessions in specified locations. You can use at least two multi-location fleets with different home locations to mitigate the impact of game placements during a Regional outage.
-
Use the same TLS certificate setting for all fleets. Game clients that connect to game sessions in your fleets must have compatible communication protocols.
Best practices for queues with Spot fleets
If your queue includes Spot fleets, set up a resilient queue. This takes advantage of cost savings with Spot fleets while minimizing the effect of game session interruptions. For help with correctly building fleets and game session queues for use with Spot fleets, see Tutorial: Set up a game session queue for Spot Instances. For more information about Spot instances, see Use Spot Instances with Amazon GameLift.
In addition to the general best practices in the previous section, consider these Spot-specific best practices:
-
Create at least one On-Demand fleet in each location. On-Demand fleets provide backup game servers for your players. You can keep your backup fleets scaled down until they're needed, and use auto scaling to increase On-Demand capacity when Spot fleets are unavailable.
-
Select different instance types across multiple Spot fleets in a location. If one Spot Instance type becomes temporarily unavailable, the interruption affects only one Spot fleet in the location. Best practice is to choose widely available instance types, and use instance types in the same family (for example, m5.large, m5.xlarge, m5.2xlarge). Use the Amazon GameLift console
to view historical pricing data for instance types.