Class ClientSideWeightedRoundRobin

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ClientSideWeightedRoundRobinOrBuilder, java.io.Serializable

    public final class ClientSideWeightedRoundRobin
    extends com.google.protobuf.GeneratedMessage
    implements ClientSideWeightedRoundRobinOrBuilder
     Configuration for the client_side_weighted_round_robin LB policy.
    
     This policy differs from the built-in ROUND_ROBIN policy in terms of
     how the endpoint weights are determined. In the ROUND_ROBIN policy,
     the endpoint weights are sent by the control plane via EDS. However,
     in this policy, the endpoint weights are instead determined via qps (queries
     per second), eps (errors per second), and utilization metrics sent by the
     endpoint using the Open Request Cost Aggregation (ORCA) protocol. Utilization
     is determined by using the ORCA application_utilization field, if set, or
     else falling back to the cpu_utilization field. All queries count toward qps,
     regardless of result. Only failed queries count toward eps. A config
     parameter error_utilization_penalty controls the penalty to adjust endpoint
     weights using eps and qps. The weight of a given endpoint is computed as:
     qps / (utilization + eps/qps * error_utilization_penalty)
    
     See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.
    
     [#next-free-field: 7]
     
    Protobuf type envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin
    See Also:
    Serialized Form
    • Field Detail

      • bitField0_

        private int bitField0_
      • ENABLE_OOB_LOAD_REPORT_FIELD_NUMBER

        public static final int ENABLE_OOB_LOAD_REPORT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • enableOobLoadReport_

        private com.google.protobuf.BoolValue enableOobLoadReport_
      • OOB_REPORTING_PERIOD_FIELD_NUMBER

        public static final int OOB_REPORTING_PERIOD_FIELD_NUMBER
        See Also:
        Constant Field Values
      • oobReportingPeriod_

        private com.google.protobuf.Duration oobReportingPeriod_
      • BLACKOUT_PERIOD_FIELD_NUMBER

        public static final int BLACKOUT_PERIOD_FIELD_NUMBER
        See Also:
        Constant Field Values
      • blackoutPeriod_

        private com.google.protobuf.Duration blackoutPeriod_
      • WEIGHT_EXPIRATION_PERIOD_FIELD_NUMBER

        public static final int WEIGHT_EXPIRATION_PERIOD_FIELD_NUMBER
        See Also:
        Constant Field Values
      • weightExpirationPeriod_

        private com.google.protobuf.Duration weightExpirationPeriod_
      • WEIGHT_UPDATE_PERIOD_FIELD_NUMBER

        public static final int WEIGHT_UPDATE_PERIOD_FIELD_NUMBER
        See Also:
        Constant Field Values
      • weightUpdatePeriod_

        private com.google.protobuf.Duration weightUpdatePeriod_
      • ERROR_UTILIZATION_PENALTY_FIELD_NUMBER

        public static final int ERROR_UTILIZATION_PENALTY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • errorUtilizationPenalty_

        private com.google.protobuf.FloatValue errorUtilizationPenalty_
      • memoizedIsInitialized

        private byte memoizedIsInitialized
    • Constructor Detail

      • ClientSideWeightedRoundRobin

        private ClientSideWeightedRoundRobin​(com.google.protobuf.GeneratedMessage.Builder<?> builder)
      • ClientSideWeightedRoundRobin

        private ClientSideWeightedRoundRobin()
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
      • hasEnableOobLoadReport

        public boolean hasEnableOobLoadReport()
         Whether to enable out-of-band utilization reporting collection from
         the endpoints. By default, per-request utilization reporting is used.
         
        .google.protobuf.BoolValue enable_oob_load_report = 1;
        Specified by:
        hasEnableOobLoadReport in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        Whether the enableOobLoadReport field is set.
      • getEnableOobLoadReport

        public com.google.protobuf.BoolValue getEnableOobLoadReport()
         Whether to enable out-of-band utilization reporting collection from
         the endpoints. By default, per-request utilization reporting is used.
         
        .google.protobuf.BoolValue enable_oob_load_report = 1;
        Specified by:
        getEnableOobLoadReport in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        The enableOobLoadReport.
      • getEnableOobLoadReportOrBuilder

        public com.google.protobuf.BoolValueOrBuilder getEnableOobLoadReportOrBuilder()
         Whether to enable out-of-band utilization reporting collection from
         the endpoints. By default, per-request utilization reporting is used.
         
        .google.protobuf.BoolValue enable_oob_load_report = 1;
        Specified by:
        getEnableOobLoadReportOrBuilder in interface ClientSideWeightedRoundRobinOrBuilder
      • hasOobReportingPeriod

        public boolean hasOobReportingPeriod()
         Load reporting interval to request from the server. Note that the
         server may not provide reports as frequently as the client requests.
         Used only when enable_oob_load_report is true. Default is 10 seconds.
         
        .google.protobuf.Duration oob_reporting_period = 2;
        Specified by:
        hasOobReportingPeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        Whether the oobReportingPeriod field is set.
      • getOobReportingPeriod

        public com.google.protobuf.Duration getOobReportingPeriod()
         Load reporting interval to request from the server. Note that the
         server may not provide reports as frequently as the client requests.
         Used only when enable_oob_load_report is true. Default is 10 seconds.
         
        .google.protobuf.Duration oob_reporting_period = 2;
        Specified by:
        getOobReportingPeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        The oobReportingPeriod.
      • getOobReportingPeriodOrBuilder

        public com.google.protobuf.DurationOrBuilder getOobReportingPeriodOrBuilder()
         Load reporting interval to request from the server. Note that the
         server may not provide reports as frequently as the client requests.
         Used only when enable_oob_load_report is true. Default is 10 seconds.
         
        .google.protobuf.Duration oob_reporting_period = 2;
        Specified by:
        getOobReportingPeriodOrBuilder in interface ClientSideWeightedRoundRobinOrBuilder
      • hasBlackoutPeriod

        public boolean hasBlackoutPeriod()
         A given endpoint must report load metrics continuously for at least
         this long before the endpoint weight will be used. This avoids
         churn when the set of endpoint addresses changes. Takes effect
         both immediately after we establish a connection to an endpoint and
         after weight_expiration_period has caused us to stop using the most
         recent load metrics. Default is 10 seconds.
         
        .google.protobuf.Duration blackout_period = 3;
        Specified by:
        hasBlackoutPeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        Whether the blackoutPeriod field is set.
      • getBlackoutPeriod

        public com.google.protobuf.Duration getBlackoutPeriod()
         A given endpoint must report load metrics continuously for at least
         this long before the endpoint weight will be used. This avoids
         churn when the set of endpoint addresses changes. Takes effect
         both immediately after we establish a connection to an endpoint and
         after weight_expiration_period has caused us to stop using the most
         recent load metrics. Default is 10 seconds.
         
        .google.protobuf.Duration blackout_period = 3;
        Specified by:
        getBlackoutPeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        The blackoutPeriod.
      • getBlackoutPeriodOrBuilder

        public com.google.protobuf.DurationOrBuilder getBlackoutPeriodOrBuilder()
         A given endpoint must report load metrics continuously for at least
         this long before the endpoint weight will be used. This avoids
         churn when the set of endpoint addresses changes. Takes effect
         both immediately after we establish a connection to an endpoint and
         after weight_expiration_period has caused us to stop using the most
         recent load metrics. Default is 10 seconds.
         
        .google.protobuf.Duration blackout_period = 3;
        Specified by:
        getBlackoutPeriodOrBuilder in interface ClientSideWeightedRoundRobinOrBuilder
      • hasWeightExpirationPeriod

        public boolean hasWeightExpirationPeriod()
         If a given endpoint has not reported load metrics in this long,
         then we stop using the reported weight. This ensures that we do
         not continue to use very stale weights. Once we stop using a stale
         value, if we later start seeing fresh reports again, the
         blackout_period applies. Defaults to 3 minutes.
         
        .google.protobuf.Duration weight_expiration_period = 4;
        Specified by:
        hasWeightExpirationPeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        Whether the weightExpirationPeriod field is set.
      • getWeightExpirationPeriod

        public com.google.protobuf.Duration getWeightExpirationPeriod()
         If a given endpoint has not reported load metrics in this long,
         then we stop using the reported weight. This ensures that we do
         not continue to use very stale weights. Once we stop using a stale
         value, if we later start seeing fresh reports again, the
         blackout_period applies. Defaults to 3 minutes.
         
        .google.protobuf.Duration weight_expiration_period = 4;
        Specified by:
        getWeightExpirationPeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        The weightExpirationPeriod.
      • getWeightExpirationPeriodOrBuilder

        public com.google.protobuf.DurationOrBuilder getWeightExpirationPeriodOrBuilder()
         If a given endpoint has not reported load metrics in this long,
         then we stop using the reported weight. This ensures that we do
         not continue to use very stale weights. Once we stop using a stale
         value, if we later start seeing fresh reports again, the
         blackout_period applies. Defaults to 3 minutes.
         
        .google.protobuf.Duration weight_expiration_period = 4;
        Specified by:
        getWeightExpirationPeriodOrBuilder in interface ClientSideWeightedRoundRobinOrBuilder
      • hasWeightUpdatePeriod

        public boolean hasWeightUpdatePeriod()
         How often endpoint weights are recalculated. Values less than 100ms are
         capped at 100ms. Default is 1 second.
         
        .google.protobuf.Duration weight_update_period = 5;
        Specified by:
        hasWeightUpdatePeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        Whether the weightUpdatePeriod field is set.
      • getWeightUpdatePeriod

        public com.google.protobuf.Duration getWeightUpdatePeriod()
         How often endpoint weights are recalculated. Values less than 100ms are
         capped at 100ms. Default is 1 second.
         
        .google.protobuf.Duration weight_update_period = 5;
        Specified by:
        getWeightUpdatePeriod in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        The weightUpdatePeriod.
      • getWeightUpdatePeriodOrBuilder

        public com.google.protobuf.DurationOrBuilder getWeightUpdatePeriodOrBuilder()
         How often endpoint weights are recalculated. Values less than 100ms are
         capped at 100ms. Default is 1 second.
         
        .google.protobuf.Duration weight_update_period = 5;
        Specified by:
        getWeightUpdatePeriodOrBuilder in interface ClientSideWeightedRoundRobinOrBuilder
      • hasErrorUtilizationPenalty

        public boolean hasErrorUtilizationPenalty()
         The multiplier used to adjust endpoint weights with the error rate
         calculated as eps/qps. Configuration is rejected if this value is negative.
         Default is 1.0.
         
        .google.protobuf.FloatValue error_utilization_penalty = 6 [(.validate.rules) = { ... }
        Specified by:
        hasErrorUtilizationPenalty in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        Whether the errorUtilizationPenalty field is set.
      • getErrorUtilizationPenalty

        public com.google.protobuf.FloatValue getErrorUtilizationPenalty()
         The multiplier used to adjust endpoint weights with the error rate
         calculated as eps/qps. Configuration is rejected if this value is negative.
         Default is 1.0.
         
        .google.protobuf.FloatValue error_utilization_penalty = 6 [(.validate.rules) = { ... }
        Specified by:
        getErrorUtilizationPenalty in interface ClientSideWeightedRoundRobinOrBuilder
        Returns:
        The errorUtilizationPenalty.
      • getErrorUtilizationPenaltyOrBuilder

        public com.google.protobuf.FloatValueOrBuilder getErrorUtilizationPenaltyOrBuilder()
         The multiplier used to adjust endpoint weights with the error rate
         calculated as eps/qps. Configuration is rejected if this value is negative.
         Default is 1.0.
         
        .google.protobuf.FloatValue error_utilization_penalty = 6 [(.validate.rules) = { ... }
        Specified by:
        getErrorUtilizationPenaltyOrBuilder in interface ClientSideWeightedRoundRobinOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessage
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessage
        Throws:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessage
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(java.nio.ByteBuffer data)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(java.nio.ByteBuffer data,
                                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(com.google.protobuf.ByteString data)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(com.google.protobuf.ByteString data,
                                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(byte[] data)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(byte[] data,
                                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(java.io.InputStream input)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(java.io.InputStream input,
                                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static ClientSideWeightedRoundRobin parseDelimitedFrom​(java.io.InputStream input)
                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

        public static ClientSideWeightedRoundRobin parseDelimitedFrom​(java.io.InputStream input,
                                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                               throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(com.google.protobuf.CodedInputStream input)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

        public static ClientSideWeightedRoundRobin parseFrom​(com.google.protobuf.CodedInputStream input,
                                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • newBuilderForType

        public ClientSideWeightedRoundRobin.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public ClientSideWeightedRoundRobin.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected ClientSideWeightedRoundRobin.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)
        Overrides:
        newBuilderForType in class com.google.protobuf.AbstractMessage
      • getParserForType

        public com.google.protobuf.Parser<ClientSideWeightedRoundRobin> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessage
      • getDefaultInstanceForType

        public ClientSideWeightedRoundRobin getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder