Documentation ¶
Index ¶
- Variables
- type RingHash
- func (*RingHash) Descriptor() ([]byte, []int)deprecated
- func (x *RingHash) GetConsistentHashingLbConfig() *v3.ConsistentHashingLbConfig
- func (x *RingHash) GetHashBalanceFactor() *wrapperspb.UInt32Valuedeprecated
- func (x *RingHash) GetHashFunction() RingHash_HashFunction
- func (x *RingHash) GetLocalityWeightedLbConfig() *v3.LocalityLbConfig_LocalityWeightedLbConfig
- func (x *RingHash) GetMaximumRingSize() *wrapperspb.UInt64Value
- func (x *RingHash) GetMinimumRingSize() *wrapperspb.UInt64Value
- func (x *RingHash) GetUseHostnameForHashing() booldeprecated
- func (*RingHash) ProtoMessage()
- func (x *RingHash) ProtoReflect() protoreflect.Message
- func (x *RingHash) Reset()
- func (x *RingHash) String() string
- func (m *RingHash) Validate() error
- func (m *RingHash) ValidateAll() error
- type RingHashMultiError
- type RingHashValidationError
- type RingHash_HashFunction
- func (RingHash_HashFunction) Descriptor() protoreflect.EnumDescriptor
- func (x RingHash_HashFunction) Enum() *RingHash_HashFunction
- func (RingHash_HashFunction) EnumDescriptor() ([]byte, []int)deprecated
- func (x RingHash_HashFunction) Number() protoreflect.EnumNumber
- func (x RingHash_HashFunction) String() string
- func (RingHash_HashFunction) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( RingHash_HashFunction_name = map[int32]string{ 0: "DEFAULT_HASH", 1: "XX_HASH", 2: "MURMUR_HASH_2", } RingHash_HashFunction_value = map[string]int32{ "DEFAULT_HASH": 0, "XX_HASH": 1, "MURMUR_HASH_2": 2, } )
Enum value maps for RingHash_HashFunction.
var File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type RingHash ¶
type RingHash struct { // The hash function used to hash hosts onto the ketama ring. The value defaults to // :ref:`XX_HASH<envoy_v3_api_enum_value_config.cluster.v3.Cluster.RingHashLbConfig.HashFunction.XX_HASH>`. HashFunction RingHash_HashFunction `` /* 179-byte string literal not displayed */ // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each // provided host) the better the request distribution will reflect the desired weights. Defaults // to 1024 entries, and limited to 8M entries. See also // :ref:`maximum_ring_size<envoy_v3_api_field_config.cluster.v3.Cluster.RingHashLbConfig.maximum_ring_size>`. MinimumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,2,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"` // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered // to further constrain resource use. See also // :ref:`minimum_ring_size<envoy_v3_api_field_config.cluster.v3.Cluster.RingHashLbConfig.minimum_ring_size>`. MaximumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"` // If set to “true“, the cluster will use hostname instead of the resolved // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address. // // .. note:: // // This is deprecated and please use :ref:`consistent_hashing_lb_config // <envoy_v3_api_field_extensions.load_balancing_policies.ring_hash.v3.RingHash.consistent_hashing_lb_config>` instead. // // Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto. UseHostnameForHashing bool `` /* 129-byte string literal not displayed */ // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150 // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster. // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200. // Minimum is 100. // // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified // “hash_balance_factor“, requests to any upstream host are capped at “hash_balance_factor/100“ times the average number of requests // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the // cascading overflow effect when choosing the next host in the ring/table). // // If weights are specified on the hosts, they are respected. // // This is an O(N) algorithm, unlike other load balancers. Using a lower “hash_balance_factor“ results in more hosts // being probed, so use a higher value if you require better performance. // // .. note:: // // This is deprecated and please use :ref:`consistent_hashing_lb_config // <envoy_v3_api_field_extensions.load_balancing_policies.ring_hash.v3.RingHash.consistent_hashing_lb_config>` instead. // // Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto. HashBalanceFactor *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=hash_balance_factor,json=hashBalanceFactor,proto3" json:"hash_balance_factor,omitempty"` // Common configuration for hashing-based load balancing policies. ConsistentHashingLbConfig *v3.ConsistentHashingLbConfig `` /* 140-byte string literal not displayed */ // Enable locality weighted load balancing for ring hash lb explicitly. LocalityWeightedLbConfig *v3.LocalityLbConfig_LocalityWeightedLbConfig `` /* 137-byte string literal not displayed */ // contains filtered or unexported fields }
This configuration allows the built-in RING_HASH 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: 8]
func (*RingHash) Descriptor
deprecated
func (*RingHash) GetConsistentHashingLbConfig ¶ added in v0.11.0
func (x *RingHash) GetConsistentHashingLbConfig() *v3.ConsistentHashingLbConfig
func (*RingHash) GetHashBalanceFactor
deprecated
func (x *RingHash) GetHashBalanceFactor() *wrapperspb.UInt32Value
Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto.
func (*RingHash) GetHashFunction ¶
func (x *RingHash) GetHashFunction() RingHash_HashFunction
func (*RingHash) GetLocalityWeightedLbConfig ¶ added in v0.11.0
func (x *RingHash) GetLocalityWeightedLbConfig() *v3.LocalityLbConfig_LocalityWeightedLbConfig
func (*RingHash) GetMaximumRingSize ¶
func (x *RingHash) GetMaximumRingSize() *wrapperspb.UInt64Value
func (*RingHash) GetMinimumRingSize ¶
func (x *RingHash) GetMinimumRingSize() *wrapperspb.UInt64Value
func (*RingHash) GetUseHostnameForHashing
deprecated
func (*RingHash) ProtoMessage ¶
func (*RingHash) ProtoMessage()
func (*RingHash) ProtoReflect ¶
func (x *RingHash) ProtoReflect() protoreflect.Message
func (*RingHash) Validate ¶
Validate checks the field values on RingHash 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 (*RingHash) ValidateAll ¶
ValidateAll checks the field values on RingHash 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 RingHashMultiError, or nil if none found.
type RingHashMultiError ¶
type RingHashMultiError []error
RingHashMultiError is an error wrapping multiple validation errors returned by RingHash.ValidateAll() if the designated constraints aren't met.
func (RingHashMultiError) AllErrors ¶
func (m RingHashMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RingHashMultiError) Error ¶
func (m RingHashMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RingHashValidationError ¶
type RingHashValidationError struct {
// contains filtered or unexported fields
}
RingHashValidationError is the validation error returned by RingHash.Validate if the designated constraints aren't met.
func (RingHashValidationError) Cause ¶
func (e RingHashValidationError) Cause() error
Cause function returns cause value.
func (RingHashValidationError) Error ¶
func (e RingHashValidationError) Error() string
Error satisfies the builtin error interface
func (RingHashValidationError) ErrorName ¶
func (e RingHashValidationError) ErrorName() string
ErrorName returns error name.
func (RingHashValidationError) Field ¶
func (e RingHashValidationError) Field() string
Field function returns field value.
func (RingHashValidationError) Key ¶
func (e RingHashValidationError) Key() bool
Key function returns key value.
func (RingHashValidationError) Reason ¶
func (e RingHashValidationError) Reason() string
Reason function returns reason value.
type RingHash_HashFunction ¶
type RingHash_HashFunction int32
The hash function used to hash hosts onto the ketama ring.
const ( // Currently defaults to XX_HASH. RingHash_DEFAULT_HASH RingHash_HashFunction = 0 // Use `xxHash <https://github.com/Cyan4973/xxHash>`_. RingHash_XX_HASH RingHash_HashFunction = 1 // Use `MurmurHash2 <https://sites.google.com/site/murmurhash/>`_, this is compatible with // std:hash<string> in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled // on Linux and not macOS. RingHash_MURMUR_HASH_2 RingHash_HashFunction = 2 )
func (RingHash_HashFunction) Descriptor ¶
func (RingHash_HashFunction) Descriptor() protoreflect.EnumDescriptor
func (RingHash_HashFunction) Enum ¶
func (x RingHash_HashFunction) Enum() *RingHash_HashFunction
func (RingHash_HashFunction) EnumDescriptor
deprecated
func (RingHash_HashFunction) EnumDescriptor() ([]byte, []int)
Deprecated: Use RingHash_HashFunction.Descriptor instead.
func (RingHash_HashFunction) Number ¶
func (x RingHash_HashFunction) Number() protoreflect.EnumNumber
func (RingHash_HashFunction) String ¶
func (x RingHash_HashFunction) String() string
func (RingHash_HashFunction) Type ¶
func (RingHash_HashFunction) Type() protoreflect.EnumType