@@ -449,6 +449,65 @@ new cloudwatch.Alarm(this, 'Alarm', {
449
449
See: [ Monitoring Using CloudWatch Metrics] ( https://docs.aws.amazon.com/gamelift/latest/developerguide/monitoring-cloudwatch.html )
450
450
in the * Amazon GameLift Developer Guide* .
451
451
452
+ ## Game session queue
453
+
454
+ The game session queue is the primary mechanism for processing new game session
455
+ requests and locating available game servers to host them. Although it is
456
+ possible to request a new game session be hosted on specific fleet or location.
457
+
458
+ The ` GameSessionQueue ` resource creates a placement queue that processes requests for
459
+ new game sessions. A queue uses FleetIQ algorithms to determine the best placement
460
+ locations and find an available game server, then prompts the game server to start a
461
+ new game session. Queues can have destinations (GameLift fleets or aliases), which
462
+ determine where the queue can place new game sessions. A queue can have destinations
463
+ with varied fleet type (Spot and On-Demand), instance type, and AWS Region.
464
+
465
+ ``` ts
466
+ declare const fleet: gamelift .BuildFleet ;
467
+ declare const alias: gamelift .Alias ;
468
+
469
+ const queue = new gamelift .GameSessionQueue (this , ' GameSessionQueue' , {
470
+ gameSessionQueueName: ' my-queue-name' ,
471
+ destinations: [fleet ]
472
+ });
473
+ queue .addDestination (alias );
474
+ ```
475
+
476
+ A more complex configuration can also be definied to override how FleetIQ algorithms prioritize game session placement in order to favour a destination based on ` Cost ` , ` Latency ` , ` Destination order ` or ` Location ` .
477
+
478
+ ``` ts
479
+ declare const fleet: gamelift .BuildFleet ;
480
+ declare const topic: sns .Topic ;
481
+
482
+ new gamelift .GameSessionQueue (this , ' MyGameSessionQueue' , {
483
+ gameSessionQueueName: ' test-gameSessionQueue' ,
484
+ customEventData: ' test-event-data' ,
485
+ allowedLocations: [' eu-west-1' , ' eu-west-2' ],
486
+ destinations: [fleet ],
487
+ notificationTarget: topic ,
488
+ playerLatencyPolicies: [{
489
+ maximumIndividualPlayerLatency: Duration .millis (100 ),
490
+ policyDuration: Duration .seconds (300 ),
491
+ }],
492
+ priorityConfiguration: {
493
+ locationOrder: [
494
+ ' eu-west-1' ,
495
+ ' eu-west-2' ,
496
+ ],
497
+ priorityOrder: [
498
+ gamelift .PriorityType .LATENCY ,
499
+ gamelift .PriorityType .COST ,
500
+ gamelift .PriorityType .DESTINATION ,
501
+ gamelift .PriorityType .LOCATION ,
502
+ ],
503
+ },
504
+ timeout: Duration .seconds (300 ),
505
+ });
506
+ ```
507
+
508
+ See [ Setting up GameLift queues for game session placement] ( https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script-uploading.html )
509
+ in the * Amazon GameLift Developer Guide* .
510
+
452
511
## GameLift FleetIQ
453
512
454
513
The GameLift FleetIQ solution is a game hosting layer that supplements the full
0 commit comments