java.lang.Object
java.lang.Enum<LeastRequest.SelectionMethod>
io.envoyproxy.envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.SelectionMethod
All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<LeastRequest.SelectionMethod>
Enclosing class:
LeastRequest

public static enum LeastRequest.SelectionMethod extends Enum<LeastRequest.SelectionMethod> implements com.google.protobuf.ProtocolMessageEnum
 Available methods for selecting the host set from which to return the host with the
 fewest active requests.
 
Protobuf enum envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.SelectionMethod
  • Enum Constant Details

    • N_CHOICES

      public static final LeastRequest.SelectionMethod N_CHOICES
       Return host with fewest requests from a set of ``choice_count`` randomly selected hosts.
       Best selection method for most scenarios.
       
      N_CHOICES = 0;
    • FULL_SCAN

      public static final LeastRequest.SelectionMethod FULL_SCAN
       Return host with fewest requests from all hosts.
       Useful in some niche use cases involving low request rates and one of:
       (example 1) low request limits on workloads, or (example 2) few hosts.
      
       Example 1: Consider a workload type that can only accept one connection at a time.
       If such workloads are deployed across many hosts, only a small percentage of those
       workloads have zero connections at any given time, and the rate of new connections is low,
       the ``FULL_SCAN`` method is more likely to select a suitable host than ``N_CHOICES``.
      
       Example 2: Consider a workload type that is only deployed on 2 hosts. With default settings,
       the ``N_CHOICES`` method will return the host with more active requests 25% of the time.
       If the request rate is sufficiently low, the behavior of always selecting the host with least
       requests as of the last metrics refresh may be preferable.
       
      FULL_SCAN = 1;
    • UNRECOGNIZED

      public static final LeastRequest.SelectionMethod UNRECOGNIZED
  • Field Details

    • N_CHOICES_VALUE

      public static final int N_CHOICES_VALUE
       Return host with fewest requests from a set of ``choice_count`` randomly selected hosts.
       Best selection method for most scenarios.
       
      N_CHOICES = 0;
      See Also:
    • FULL_SCAN_VALUE

      public static final int FULL_SCAN_VALUE
       Return host with fewest requests from all hosts.
       Useful in some niche use cases involving low request rates and one of:
       (example 1) low request limits on workloads, or (example 2) few hosts.
      
       Example 1: Consider a workload type that can only accept one connection at a time.
       If such workloads are deployed across many hosts, only a small percentage of those
       workloads have zero connections at any given time, and the rate of new connections is low,
       the ``FULL_SCAN`` method is more likely to select a suitable host than ``N_CHOICES``.
      
       Example 2: Consider a workload type that is only deployed on 2 hosts. With default settings,
       the ``N_CHOICES`` method will return the host with more active requests 25% of the time.
       If the request rate is sufficiently low, the behavior of always selecting the host with least
       requests as of the last metrics refresh may be preferable.
       
      FULL_SCAN = 1;
      See Also:
    • internalValueMap

      private static final com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod> internalValueMap
    • VALUES

      private static final LeastRequest.SelectionMethod[] VALUES
    • value

      private final int value
  • Constructor Details

    • SelectionMethod

      private SelectionMethod(int value)
  • Method Details

    • values

      public static LeastRequest.SelectionMethod[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static LeastRequest.SelectionMethod valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.google.protobuf.ProtocolMessageEnum
    • valueOf

      @Deprecated public static LeastRequest.SelectionMethod valueOf(int value)
      Deprecated.
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      value - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • forNumber

      public static LeastRequest.SelectionMethod forNumber(int value)
      Parameters:
      value - The numeric wire value of the corresponding enum entry.
      Returns:
      The enum associated with the given numeric wire value.
    • internalGetValueMap

      public static com.google.protobuf.Internal.EnumLiteMap<LeastRequest.SelectionMethod> internalGetValueMap()
    • getValueDescriptor

      public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
      Specified by:
      getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
    • valueOf

      public static LeastRequest.SelectionMethod valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      desc - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null