Documentation
¶
Index ¶
- Variables
- type RingHash
- func (x *RingHash) ClearConsistentHashingLbConfig()
- func (x *RingHash) ClearHashBalanceFactor()deprecated
- func (x *RingHash) ClearLocalityWeightedLbConfig()
- func (x *RingHash) ClearMaximumRingSize()
- func (x *RingHash) ClearMinimumRingSize()
- 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 (x *RingHash) HasConsistentHashingLbConfig() bool
- func (x *RingHash) HasHashBalanceFactor() booldeprecated
- func (x *RingHash) HasLocalityWeightedLbConfig() bool
- func (x *RingHash) HasMaximumRingSize() bool
- func (x *RingHash) HasMinimumRingSize() bool
- func (*RingHash) ProtoMessage()
- func (x *RingHash) ProtoReflect() protoreflect.Message
- func (x *RingHash) Reset()
- func (x *RingHash) SetConsistentHashingLbConfig(v *v3.ConsistentHashingLbConfig)
- func (x *RingHash) SetHashBalanceFactor(v *wrapperspb.UInt32Value)deprecated
- func (x *RingHash) SetHashFunction(v RingHash_HashFunction)
- func (x *RingHash) SetLocalityWeightedLbConfig(v *v3.LocalityLbConfig_LocalityWeightedLbConfig)
- func (x *RingHash) SetMaximumRingSize(v *wrapperspb.UInt64Value)
- func (x *RingHash) SetMinimumRingSize(v *wrapperspb.UInt64Value)
- func (x *RingHash) SetUseHostnameForHashing(v bool)deprecated
- func (x *RingHash) String() string
- type RingHash_HashFunction
- type RingHash_builder
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) ClearConsistentHashingLbConfig ¶
func (x *RingHash) ClearConsistentHashingLbConfig()
func (*RingHash) ClearHashBalanceFactor
deprecated
func (x *RingHash) ClearHashBalanceFactor()
Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto.
func (*RingHash) GetConsistentHashingLbConfig ¶
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 ¶
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) HasConsistentHashingLbConfig ¶
func (*RingHash) HasLocalityWeightedLbConfig ¶
func (*RingHash) ProtoReflect ¶
func (x *RingHash) ProtoReflect() protoreflect.Message
func (*RingHash) SetConsistentHashingLbConfig ¶
func (x *RingHash) SetConsistentHashingLbConfig(v *v3.ConsistentHashingLbConfig)
func (*RingHash) SetHashBalanceFactor
deprecated
func (x *RingHash) SetHashBalanceFactor(v *wrapperspb.UInt32Value)
Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto.
func (*RingHash) SetHashFunction ¶
func (x *RingHash) SetHashFunction(v RingHash_HashFunction)
func (*RingHash) SetLocalityWeightedLbConfig ¶
func (x *RingHash) SetLocalityWeightedLbConfig(v *v3.LocalityLbConfig_LocalityWeightedLbConfig)
func (*RingHash) SetMaximumRingSize ¶
func (x *RingHash) SetMaximumRingSize(v *wrapperspb.UInt64Value)
func (*RingHash) SetMinimumRingSize ¶
func (x *RingHash) SetMinimumRingSize(v *wrapperspb.UInt64Value)
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) 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
type RingHash_builder ¶
type RingHash_builder 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
// 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
// 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
// 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
// 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
// Common configuration for hashing-based load balancing policies.
ConsistentHashingLbConfig *v3.ConsistentHashingLbConfig
// Enable locality weighted load balancing for ring hash lb explicitly.
LocalityWeightedLbConfig *v3.LocalityLbConfig_LocalityWeightedLbConfig
// contains filtered or unexported fields
}
func (RingHash_builder) Build ¶
func (b0 RingHash_builder) Build() *RingHash
Source Files
¶
- ring_hash.pb.go