OutlierDetection
- class aws_cdk.aws_appmesh.OutlierDetection(*, base_ejection_duration, interval, max_ejection_percent, max_server_errors)
Bases:
object
Represents the outlier detection for a listener.
- Parameters:
base_ejection_duration (
Duration
) – The base amount of time for which a host is ejected.interval (
Duration
) – The time interval between ejection sweep analysis.max_ejection_percent (
Union
[int
,float
]) – 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.max_server_errors (
Union
[int
,float
]) – Number of consecutive 5xx errors required for ejection.
- ExampleMetadata:
infused
Example:
# mesh: appmesh.Mesh # Cloud Map service discovery is currently required for host ejection by outlier detection vpc = ec2.Vpc(self, "vpc") namespace = cloudmap.PrivateDnsNamespace(self, "test-namespace", vpc=vpc, name="domain.local" ) service = namespace.create_service("Svc") node = mesh.add_virtual_node("virtual-node", service_discovery=appmesh.ServiceDiscovery.cloud_map(service), listeners=[appmesh.VirtualNodeListener.http( outlier_detection=appmesh.OutlierDetection( base_ejection_duration=Duration.seconds(10), interval=Duration.seconds(30), max_ejection_percent=50, max_server_errors=5 ) )] )
Attributes
- base_ejection_duration
The base amount of time for which a host is ejected.
- interval
The time interval between ejection sweep analysis.
- max_ejection_percent
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.
- max_server_errors
Number of consecutive 5xx errors required for ejection.