aws-cdk-lib.aws_appmesh.OutlierDetection

interface OutlierDetection

LanguageType name
.NETAmazon.CDK.AWS.AppMesh.OutlierDetection
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#OutlierDetection
Javasoftware.amazon.awscdk.services.appmesh.OutlierDetection
Pythonaws_cdk.aws_appmesh.OutlierDetection
TypeScript (source)aws-cdk-lib » 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: Duration.seconds(10),
      interval: Duration.seconds(30),
      maxEjectionPercent: 50,
      maxServerErrors: 5,
    },
  })],
});

Properties

NameTypeDescription
baseEjectionDurationDurationThe base amount of time for which a host is ejected.
intervalDurationThe time interval between ejection sweep analysis.
maxEjectionPercentnumberMaximum percentage of hosts in load balancing pool for upstream service that can be ejected.
maxServerErrorsnumberNumber 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.