Project: Gloo (Orchestration & Management / API Gateway)
File: load_balancer.proto.sk.md

title: "load_balancer.proto" weight: 5 <!-- Code generated by solo-kit. DO NOT EDIT. --> LoadBalancerConfig is the settings for the load balancer used to send requests to the Upstream endpoints. ```yaml "healthyPanicThreshold": .google.protobuf.DoubleValue "updateMergeWindow": .google.protobuf.Duration "roundRobin": .gloo.solo.io.LoadBalancerConfig.RoundRobin "leastRequest": .gloo.solo.io.LoadBalancerConfig.LeastRequest "random": .gloo.solo.io.LoadBalancerConfig.Random "ringHash": .gloo.solo.io.LoadBalancerConfig.RingHash "maglev": .gloo.solo.io.LoadBalancerConfig.Maglev "localityWeightedLbConfig": .google.protobuf.Empty "useHostnameForHashing": .google.protobuf.BoolValue ``` | Field | Type | Description | | -- | - | -- | | `healthyPanicThreshold` | | Configures envoy's panic threshold Percent between 0-100. Once the number of non health hosts reaches this percentage, envoy disregards health information. see more info . | | `updateMergeWindow` | | This allows batch updates of endpoints health/weight/metadata that happen during a time window. this help lower cpu usage when endpoint change rate is high. defaults to 1 second. Set to 0 to disable and have changes applied immediately. | | `roundRobin` | | Use round robin for load balancing. Round robin is the default load balancing method. Only one of `roundRobin`, `leastRequest`, `random`, `ringHash`, or `maglev` can be set. | | `leastRequest` | | Use least request for load balancing. Only one of `leastRequest`, `roundRobin`, `random`, `ringHash`, or `maglev` can be set. | | `random` | | Use random for load balancing. Only one of `random`, `roundRobin`, `leastRequest`, `ringHash`, or `maglev` can be set. | | `ringHash` | | Use ring hash for load balancing. Only one of `ringHash`, `roundRobin`, `leastRequest`, `random`, or `maglev` can be set. | | `maglev` | | Use maglev for load balancing. Only one of `maglev`, `roundRobin`, `leastRequest`, `random`, or `ringHash` can be set. | | `localityWeightedLbConfig` | | (Enterprise Only) https://www.envoyproxy.io/docs/envoy/latest/intro/archoverview/upstream/loadbalancing/locality_weight#locality-weighted-load-balancing Locality weighted load balancing enables weighting assignments across different zones and geographical locations by using explicit weights. This field is required to enable locality weighted load balancing. | | `useHostnameForHashing` | | Default: false, If set to true, the hostname will be used for hashing when using maglev for example, useful when using multiple host in the upstreams that resolve to the same IP. | ```yaml "slowStartConfig": .gloo.solo.io.LoadBalancerConfig.SlowStartConfig ``` | Field | Type | Description | | -- | - | -- | | `slowStartConfig` | | Configuration for slow start mode. If this configuration is not set, slow start will not be not enabled. | ```yaml "choiceCount": int "slowStartConfig": .gloo.solo.io.LoadBalancerConfig.SlowStartConfig ``` | Field | Type | Description | | -- | - | -- | | `choiceCount` | `int` | How many choices to take into account. defaults to 2. | | `slowStartConfig` | | Configuration for slow start

If this configuration is not set, slow start will not be not enabled. | ```yaml ``` | Field | Type | Description | | -- | - | -- | Customizes the parameters used in the hashing algorithm to refine performance or resource usage. ```yaml "minimumRingSize": int "maximumRingSize": int ``` | Field | Type | Description | | -- | - | -- | | `minimumRingSize` | `int` | 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. | | `maximumRingSize` | `int` | Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered to further constrain resource use. | ```yaml "ringHashConfig": .gloo.solo.io.LoadBalancerConfig.RingHashConfig ``` | Field | Type | Description | | -- | - | -- | | `ringHashConfig` | | Optional, customizes the parameters used in the hashing algorithm. | ```yaml ``` | Field | Type | Description | | -- | - | -- | ```yaml "slowStartWindow": .google.protobuf.Duration "aggression": .google.protobuf.DoubleValue "minWeightPercent": .google.protobuf.DoubleValue ``` | Field | Type | Description | | -- | - | -- | | `slowStartWindow` | | Represents the size of slow start window. If set, the newly created host remains in slow start mode starting from its creation time for the duration of slow start window. | | `aggression` | | This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0, so that endpoint would get linearly increasing amount of traffic. When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly. The value of aggression parameter should be greater than 0.0. By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve. During slow start window, effective weight of an endpoint would be scaled with time factor and aggression: ``newweight = weight * max(minweightpercent, timefactor ^ (1 / aggression))``, where ``timefactor=(timesincestartseconds / slowstarttimeseconds)``. As time progresses, more and more traffic would be sent to endpoint, which is in slow start window. Once host exits slow start, timefactor and aggression no longer affect its weight. | | `minWeightPercent` | | Configures the minimum percentage of origin weight that avoids too small new weight, which may cause endpoints in slow start mode receive no traffic in slow start window. If not specified, the default is 10%. | <!-- Start of HubSpot Embed Code --> <script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/5130874.js"></script> <!-- End of HubSpot Embed Code -->