Class RequestCountScalingProps
The properties for enabling scaling based on Application Load Balancer (ALB) request counts.
Inheritance
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class RequestCountScalingProps : Object, IRequestCountScalingProps, IBaseTargetTrackingProps
Syntax (vb)
Public Class RequestCountScalingProps
Inherits Object
Implements IRequestCountScalingProps, IBaseTargetTrackingProps
Remarks
ExampleMetadata: infused
Examples
ApplicationTargetGroup target;
BaseService service;
var scaling = service.AutoScaleTaskCount(new EnableScalingProps { MaxCapacity = 10 });
scaling.ScaleOnCpuUtilization("CpuScaling", new CpuUtilizationScalingProps {
TargetUtilizationPercent = 50
});
scaling.ScaleOnRequestCount("RequestScaling", new RequestCountScalingProps {
RequestsPerTarget = 10000,
TargetGroup = target
});
Synopsis
Constructors
RequestCountScalingProps() |
Properties
DisableScaleIn | Indicates whether scale in by the target tracking policy is disabled. |
PolicyName | A name for the scaling policy. |
RequestsPerTarget | The number of ALB requests per target. |
ScaleInCooldown | Period after a scale in activity completes before another scale in activity can start. |
ScaleOutCooldown | Period after a scale out activity completes before another scale out activity can start. |
TargetGroup | The ALB target group name. |
Constructors
RequestCountScalingProps()
public RequestCountScalingProps()
Properties
DisableScaleIn
Indicates whether scale in by the target tracking policy is disabled.
public Nullable<bool> DisableScaleIn { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
If the value is true, scale in is disabled and the target tracking policy won't remove capacity from the scalable resource. Otherwise, scale in is enabled and the target tracking policy can remove capacity from the scalable resource.
Default: false
PolicyName
A name for the scaling policy.
public string PolicyName { get; set; }
Property Value
System.String
Remarks
Default: - Automatically generated name.
RequestsPerTarget
The number of ALB requests per target.
public double RequestsPerTarget { get; set; }
Property Value
System.Double
ScaleInCooldown
Period after a scale in activity completes before another scale in activity can start.
public Duration ScaleInCooldown { get; set; }
Property Value
Remarks
Default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency
ScaleOutCooldown
Period after a scale out activity completes before another scale out activity can start.
public Duration ScaleOutCooldown { get; set; }
Property Value
Remarks
Default: Duration.seconds(300) for the following scalable targets: ECS services, Spot Fleet requests, EMR clusters, AppStream 2.0 fleets, Aurora DB clusters, Amazon SageMaker endpoint variants, Custom resources. For all other scalable targets, the default value is Duration.seconds(0): DynamoDB tables, DynamoDB global secondary indexes, Amazon Comprehend document classification endpoints, Lambda provisioned concurrency
TargetGroup
The ALB target group name.
public ApplicationTargetGroup TargetGroup { get; set; }
Property Value