interface AutoScalingPolicy
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.GameLift.Alpha.AutoScalingPolicy |
Go | github.com/aws/aws-cdk-go/awscdkgameliftalpha/v2#AutoScalingPolicy |
Java | software.amazon.awscdk.services.gamelift.alpha.AutoScalingPolicy |
Python | aws_cdk.aws_gamelift_alpha.AutoScalingPolicy |
TypeScript (source) | @aws-cdk/aws-gamelift-alpha » AutoScalingPolicy |
Configuration settings for intelligent automatic scaling that uses target tracking.
After the Auto Scaling group is created, all updates to Auto Scaling policies, including changing this policy and adding or removing other policies, is done directly on the Auto Scaling group.
Example
declare const launchTemplate: ec2.ILaunchTemplate;
declare const vpc: ec2.IVpc;
new gamelift.GameServerGroup(this, 'Game server group', {
gameServerGroupName: 'sample-gameservergroup-name',
instanceDefinitions: [{
instanceType: ec2.InstanceType.of(ec2.InstanceClass.C5, ec2.InstanceSize.LARGE),
},
{
instanceType: ec2.InstanceType.of(ec2.InstanceClass.C4, ec2.InstanceSize.LARGE),
}],
launchTemplate: launchTemplate,
vpc: vpc,
autoScalingPolicy: {
estimatedInstanceWarmup: Duration.minutes(5),
targetTrackingConfiguration: 5
}
});
Properties
Name | Type | Description |
---|---|---|
target | number | Settings for a target-based scaling policy applied to Auto Scaling group. |
estimated | Duration | Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ. |
targetTrackingConfiguration
Type:
number
Settings for a target-based scaling policy applied to Auto Scaling group.
These settings are used to create a target-based policy that tracks the GameLift FleetIQ metric PercentUtilizedGameServers
and specifies a target value for the metric.
As player usage changes, the policy triggers to adjust the game server group capacity so that the metric returns to the target value.
estimatedInstanceWarmup?
Type:
Duration
(optional, default: no instance warmup duration settled)
Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ.
Specifying a warm-up time can be useful, particularly with game servers that take a long time to start up, because it avoids prematurely starting new instances.