Class AutoScalingPolicy
(experimental) Configuration settings for intelligent automatic scaling that uses target tracking.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.GameLift.Alpha
Assembly: Amazon.CDK.AWS.GameLift.Alpha.dll
Syntax (csharp)
public class AutoScalingPolicy : Object, IAutoScalingPolicy
Syntax (vb)
Public Class AutoScalingPolicy
Inherits Object
Implements IAutoScalingPolicy
Remarks
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.
Stability: Experimental
ExampleMetadata: infused
Examples
ILaunchTemplate launchTemplate;
IVpc vpc;
new GameServerGroup(this, "Game server group", new GameServerGroupProps {
GameServerGroupName = "sample-gameservergroup-name",
InstanceDefinitions = new [] { new InstanceDefinition {
InstanceType = InstanceType.Of(InstanceClass.C5, InstanceSize.LARGE)
}, new InstanceDefinition {
InstanceType = InstanceType.Of(InstanceClass.C4, InstanceSize.LARGE)
} },
LaunchTemplate = launchTemplate,
Vpc = vpc,
AutoScalingPolicy = new AutoScalingPolicy {
EstimatedInstanceWarmup = Duration.Minutes(5),
TargetTrackingConfiguration = 5
}
});
Synopsis
Constructors
AutoScalingPolicy() |
Properties
EstimatedInstanceWarmup | (experimental) Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ. |
TargetTrackingConfiguration | (experimental) Settings for a target-based scaling policy applied to Auto Scaling group. |
Constructors
AutoScalingPolicy()
public AutoScalingPolicy()
Properties
EstimatedInstanceWarmup
(experimental) Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ.
public Duration EstimatedInstanceWarmup { get; set; }
Property Value
Remarks
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.
Default: no instance warmup duration settled
Stability: Experimental
TargetTrackingConfiguration
(experimental) Settings for a target-based scaling policy applied to Auto Scaling group.
public double TargetTrackingConfiguration { get; set; }
Property Value
System.Double
Remarks
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.
Stability: Experimental