interface OutlierDetection
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.OutlierDetection |
Java | software.amazon.awscdk.services.appmesh.OutlierDetection |
Python | aws_cdk.aws_appmesh.OutlierDetection |
TypeScript (source) | @aws-cdk/aws-appmesh » OutlierDetection |
Represents the outlier detection for a listener.
Example
// Cloud Map service discovery is currently required for host ejection by outlier detection
const vpc = new ec2.Vpc(this, 'vpc');
const namespace = new cloudmap.PrivateDnsNamespace(this, 'test-namespace', {
vpc,
name: 'domain.local',
});
const service = namespace.createService('Svc');
declare const mesh: appmesh.Mesh;
const node = mesh.addVirtualNode('virtual-node', {
serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
listeners: [appmesh.VirtualNodeListener.http({
outlierDetection: {
baseEjectionDuration: cdk.Duration.seconds(10),
interval: cdk.Duration.seconds(30),
maxEjectionPercent: 50,
maxServerErrors: 5,
},
})],
});
Properties
Name | Type | Description |
---|---|---|
base | Duration | The base amount of time for which a host is ejected. |
interval | Duration | The time interval between ejection sweep analysis. |
max | number | Maximum percentage of hosts in load balancing pool for upstream service that can be ejected. |
max | number | Number of consecutive 5xx errors required for ejection. |
baseEjectionDuration
Type:
Duration
The base amount of time for which a host is ejected.
interval
Type:
Duration
The time interval between ejection sweep analysis.
maxEjectionPercent
Type:
number
Maximum percentage of hosts in load balancing pool for upstream service that can be ejected.
Will eject at least one host regardless of the value.
maxServerErrors
Type:
number
Number of consecutive 5xx errors required for ejection.