Documentation ¶
Index ¶
- Variables
- type LeastRequest
- func (*LeastRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LeastRequest) GetActiveRequestBias() *v3.RuntimeDouble
- func (x *LeastRequest) GetChoiceCount() *wrapperspb.UInt32Value
- func (x *LeastRequest) GetEnableFullScan() *wrapperspb.BoolValuedeprecated
- func (x *LeastRequest) GetLocalityLbConfig() *v31.LocalityLbConfig
- func (x *LeastRequest) GetSelectionMethod() LeastRequest_SelectionMethod
- func (x *LeastRequest) GetSlowStartConfig() *v31.SlowStartConfig
- func (*LeastRequest) ProtoMessage()
- func (x *LeastRequest) ProtoReflect() protoreflect.Message
- func (x *LeastRequest) Reset()
- func (x *LeastRequest) String() string
- func (m *LeastRequest) Validate() error
- func (m *LeastRequest) ValidateAll() error
- type LeastRequestMultiError
- type LeastRequestValidationError
- func (e LeastRequestValidationError) Cause() error
- func (e LeastRequestValidationError) Error() string
- func (e LeastRequestValidationError) ErrorName() string
- func (e LeastRequestValidationError) Field() string
- func (e LeastRequestValidationError) Key() bool
- func (e LeastRequestValidationError) Reason() string
- type LeastRequest_SelectionMethod
- func (LeastRequest_SelectionMethod) Descriptor() protoreflect.EnumDescriptor
- func (x LeastRequest_SelectionMethod) Enum() *LeastRequest_SelectionMethod
- func (LeastRequest_SelectionMethod) EnumDescriptor() ([]byte, []int)deprecated
- func (x LeastRequest_SelectionMethod) Number() protoreflect.EnumNumber
- func (x LeastRequest_SelectionMethod) String() string
- func (LeastRequest_SelectionMethod) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( LeastRequest_SelectionMethod_name = map[int32]string{ 0: "N_CHOICES", 1: "FULL_SCAN", } LeastRequest_SelectionMethod_value = map[string]int32{ "N_CHOICES": 0, "FULL_SCAN": 1, } )
Enum value maps for LeastRequest_SelectionMethod.
var File_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type LeastRequest ¶
type LeastRequest struct { // The number of random healthy hosts from which the host with the fewest active requests will // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set. // Only applies to the “N_CHOICES“ selection method. ChoiceCount *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"` // The following formula is used to calculate the dynamic weights when hosts have different load // balancing weights: // // “weight = load_balancing_weight / (active_requests + 1)^active_request_bias“ // // The larger the active request bias is, the more aggressively active requests will lower the // effective weight when all host weights are not equal. // // “active_request_bias“ must be greater than or equal to 0.0. // // When “active_request_bias == 0.0“ the Least Request Load Balancer doesn't consider the number // of active requests at the time it picks a host and behaves like the Round Robin Load // Balancer. // // When “active_request_bias > 0.0“ the Least Request Load Balancer scales the load balancing // weight by the number of active requests at the time it does a pick. // // The value is cached for performance reasons and refreshed whenever one of the Load Balancer's // host sets changes, e.g., whenever there is a host membership update or a host load balancing // weight change. // // .. note:: // // This setting only takes effect if all host weights are not equal. ActiveRequestBias *v3.RuntimeDouble `protobuf:"bytes,2,opt,name=active_request_bias,json=activeRequestBias,proto3" json:"active_request_bias,omitempty"` // Configuration for slow start mode. // If this configuration is not set, slow start will not be not enabled. SlowStartConfig *v31.SlowStartConfig `protobuf:"bytes,3,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"` // Configuration for local zone aware load balancing or locality weighted load balancing. LocalityLbConfig *v31.LocalityLbConfig `protobuf:"bytes,4,opt,name=locality_lb_config,json=localityLbConfig,proto3" json:"locality_lb_config,omitempty"` // [#not-implemented-hide:] // Unused. Replaced by the `selection_method` enum for better extensibility. // // Deprecated: Do not use. EnableFullScan *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=enable_full_scan,json=enableFullScan,proto3" json:"enable_full_scan,omitempty"` // Method for selecting the host set from which to return the host with the fewest active requests. // // Defaults to “N_CHOICES“. SelectionMethod LeastRequest_SelectionMethod `` /* 199-byte string literal not displayed */ // contains filtered or unexported fields }
This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy extension point. See the :ref:`load balancing architecture overview <arch_overview_load_balancing_types>` for more information. [#next-free-field: 7]
func (*LeastRequest) Descriptor
deprecated
func (*LeastRequest) Descriptor() ([]byte, []int)
Deprecated: Use LeastRequest.ProtoReflect.Descriptor instead.
func (*LeastRequest) GetActiveRequestBias ¶
func (x *LeastRequest) GetActiveRequestBias() *v3.RuntimeDouble
func (*LeastRequest) GetChoiceCount ¶
func (x *LeastRequest) GetChoiceCount() *wrapperspb.UInt32Value
func (*LeastRequest) GetEnableFullScan
deprecated
func (x *LeastRequest) GetEnableFullScan() *wrapperspb.BoolValue
Deprecated: Do not use.
func (*LeastRequest) GetLocalityLbConfig ¶
func (x *LeastRequest) GetLocalityLbConfig() *v31.LocalityLbConfig
func (*LeastRequest) GetSelectionMethod ¶
func (x *LeastRequest) GetSelectionMethod() LeastRequest_SelectionMethod
func (*LeastRequest) GetSlowStartConfig ¶
func (x *LeastRequest) GetSlowStartConfig() *v31.SlowStartConfig
func (*LeastRequest) ProtoMessage ¶
func (*LeastRequest) ProtoMessage()
func (*LeastRequest) ProtoReflect ¶
func (x *LeastRequest) ProtoReflect() protoreflect.Message
func (*LeastRequest) Reset ¶
func (x *LeastRequest) Reset()
func (*LeastRequest) String ¶
func (x *LeastRequest) String() string
func (*LeastRequest) Validate ¶
func (m *LeastRequest) Validate() error
Validate checks the field values on LeastRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*LeastRequest) ValidateAll ¶
func (m *LeastRequest) ValidateAll() error
ValidateAll checks the field values on LeastRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LeastRequestMultiError, or nil if none found.
type LeastRequestMultiError ¶
type LeastRequestMultiError []error
LeastRequestMultiError is an error wrapping multiple validation errors returned by LeastRequest.ValidateAll() if the designated constraints aren't met.
func (LeastRequestMultiError) AllErrors ¶
func (m LeastRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (LeastRequestMultiError) Error ¶
func (m LeastRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type LeastRequestValidationError ¶
type LeastRequestValidationError struct {
// contains filtered or unexported fields
}
LeastRequestValidationError is the validation error returned by LeastRequest.Validate if the designated constraints aren't met.
func (LeastRequestValidationError) Cause ¶
func (e LeastRequestValidationError) Cause() error
Cause function returns cause value.
func (LeastRequestValidationError) Error ¶
func (e LeastRequestValidationError) Error() string
Error satisfies the builtin error interface
func (LeastRequestValidationError) ErrorName ¶
func (e LeastRequestValidationError) ErrorName() string
ErrorName returns error name.
func (LeastRequestValidationError) Field ¶
func (e LeastRequestValidationError) Field() string
Field function returns field value.
func (LeastRequestValidationError) Key ¶
func (e LeastRequestValidationError) Key() bool
Key function returns key value.
func (LeastRequestValidationError) Reason ¶
func (e LeastRequestValidationError) Reason() string
Reason function returns reason value.
type LeastRequest_SelectionMethod ¶
type LeastRequest_SelectionMethod int32
Available methods for selecting the host set from which to return the host with the fewest active requests.
const ( // Return host with fewest requests from a set of “choice_count“ randomly selected hosts. // Best selection method for most scenarios. LeastRequest_N_CHOICES LeastRequest_SelectionMethod = 0 // 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. LeastRequest_FULL_SCAN LeastRequest_SelectionMethod = 1 )
func (LeastRequest_SelectionMethod) Descriptor ¶
func (LeastRequest_SelectionMethod) Descriptor() protoreflect.EnumDescriptor
func (LeastRequest_SelectionMethod) Enum ¶
func (x LeastRequest_SelectionMethod) Enum() *LeastRequest_SelectionMethod
func (LeastRequest_SelectionMethod) EnumDescriptor
deprecated
func (LeastRequest_SelectionMethod) EnumDescriptor() ([]byte, []int)
Deprecated: Use LeastRequest_SelectionMethod.Descriptor instead.
func (LeastRequest_SelectionMethod) Number ¶
func (x LeastRequest_SelectionMethod) Number() protoreflect.EnumNumber
func (LeastRequest_SelectionMethod) String ¶
func (x LeastRequest_SelectionMethod) String() string
func (LeastRequest_SelectionMethod) Type ¶
func (LeastRequest_SelectionMethod) Type() protoreflect.EnumType