Interface OutlierDetection

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
OutlierDetection.Jsii$Proxy

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:38.686Z") @Stability(Stable) public interface OutlierDetection extends software.amazon.jsii.JsiiSerializable
Represents the outlier detection for a listener.

Example:

 Mesh mesh;
 // Cloud Map service discovery is currently required for host ejection by outlier detection
 Vpc vpc = new Vpc(this, "vpc");
 PrivateDnsNamespace namespace = PrivateDnsNamespace.Builder.create(this, "test-namespace")
         .vpc(vpc)
         .name("domain.local")
         .build();
 Service service = namespace.createService("Svc");
 VirtualNode node = mesh.addVirtualNode("virtual-node", VirtualNodeBaseProps.builder()
         .serviceDiscovery(ServiceDiscovery.cloudMap(service))
         .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
                 .outlierDetection(OutlierDetection.builder()
                         .baseEjectionDuration(Duration.seconds(10))
                         .interval(Duration.seconds(30))
                         .maxEjectionPercent(50)
                         .maxServerErrors(5)
                         .build())
                 .build())))
         .build());
 
  • Method Details

    • getBaseEjectionDuration

      @Stability(Stable) @NotNull Duration getBaseEjectionDuration()
      The base amount of time for which a host is ejected.
    • getInterval

      @Stability(Stable) @NotNull Duration getInterval()
      The time interval between ejection sweep analysis.
    • getMaxEjectionPercent

      @Stability(Stable) @NotNull Number getMaxEjectionPercent()
      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.

    • getMaxServerErrors

      @Stability(Stable) @NotNull Number getMaxServerErrors()
      Number of consecutive 5xx errors required for ejection.
    • builder

      @Stability(Stable) static OutlierDetection.Builder builder()
      Returns:
      a OutlierDetection.Builder of OutlierDetection