Class OutlierDetection
Represents the outlier detection for a listener.
Inheritance
System.Object
OutlierDetection
Implements
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OutlierDetection : Object, IOutlierDetection
Syntax (vb)
Public Class OutlierDetection
Inherits Object
Implements IOutlierDetection
Remarks
ExampleMetadata: infused
Examples
Mesh mesh;
// Cloud Map service discovery is currently required for host ejection by outlier detection
var vpc = new Vpc(this, "vpc");
var namespace = new PrivateDnsNamespace(this, "test-namespace", new PrivateDnsNamespaceProps {
Vpc = vpc,
Name = "domain.local"
});
var service = namespace.CreateService("Svc");
var node = mesh.AddVirtualNode("virtual-node", new VirtualNodeBaseProps {
ServiceDiscovery = ServiceDiscovery.CloudMap(service),
Listeners = new [] { VirtualNodeListener.Http(new HttpVirtualNodeListenerOptions {
OutlierDetection = new OutlierDetection {
BaseEjectionDuration = Duration.Seconds(10),
Interval = Duration.Seconds(30),
MaxEjectionPercent = 50,
MaxServerErrors = 5
}
}) }
});
Synopsis
Constructors
OutlierDetection() |
Properties
BaseEjectionDuration | The base amount of time for which a host is ejected. |
Interval | The time interval between ejection sweep analysis. |
MaxEjectionPercent | Maximum percentage of hosts in load balancing pool for upstream service that can be ejected. |
MaxServerErrors | Number of consecutive 5xx errors required for ejection. |
Constructors
OutlierDetection()
public OutlierDetection()
Properties
BaseEjectionDuration
The base amount of time for which a host is ejected.
public Duration BaseEjectionDuration { get; set; }
Property Value
Interval
The time interval between ejection sweep analysis.
public Duration Interval { get; set; }
Property Value
MaxEjectionPercent
Maximum percentage of hosts in load balancing pool for upstream service that can be ejected.
public double MaxEjectionPercent { get; set; }
Property Value
System.Double
Remarks
Will eject at least one host regardless of the value.
MaxServerErrors
Number of consecutive 5xx errors required for ejection.
public double MaxServerErrors { get; set; }
Property Value
System.Double