Interface ConsistentHashingLbConfigOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
ConsistentHashingLbConfig
,ConsistentHashingLbConfig.Builder
public interface ConsistentHashingLbConfigOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.protobuf.UInt32Value
Configures percentage of average cluster load to bound per upstream host.com.google.protobuf.UInt32ValueOrBuilder
Configures percentage of average cluster load to bound per upstream host.boolean
If set to ``true``, the cluster will use hostname instead of the resolved address as the key to consistently hash to an upstream host.boolean
Configures percentage of average cluster load to bound per upstream host.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getUseHostnameForHashing
boolean getUseHostnameForHashing()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.
bool use_hostname_for_hashing = 1;
- Returns:
- The useHostnameForHashing.
-
hasHashBalanceFactor
boolean hasHashBalanceFactor()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. Applies to both Ring Hash and Maglev load balancers. 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.
.google.protobuf.UInt32Value hash_balance_factor = 2 [(.validate.rules) = { ... }
- Returns:
- Whether the hashBalanceFactor field is set.
-
getHashBalanceFactor
com.google.protobuf.UInt32Value getHashBalanceFactor()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. Applies to both Ring Hash and Maglev load balancers. 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.
.google.protobuf.UInt32Value hash_balance_factor = 2 [(.validate.rules) = { ... }
- Returns:
- The hashBalanceFactor.
-
getHashBalanceFactorOrBuilder
com.google.protobuf.UInt32ValueOrBuilder getHashBalanceFactorOrBuilder()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. Applies to both Ring Hash and Maglev load balancers. 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.
.google.protobuf.UInt32Value hash_balance_factor = 2 [(.validate.rules) = { ... }
-