lbhash.proto

Package: lbhash.options.gloo.solo.io

Types:

Source File: github.com/solo-io/gloo/projects/gloo/api/v1/options/lbhash/lbhash.proto

RouteActionHashConfig

Specifies the route’s hashing policy if the upstream cluster uses a hashing load balancer. https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route.proto#envoy-api-msg-route-routeaction-hashpolicy

"hashPolicies": []lbhash.options.gloo.solo.io.HashPolicy

Field Type Description
hashPolicies []lbhash.options.gloo.solo.io.HashPolicy The list of policies Envoy will use when generating a hash key for a hashing load balancer.

Envoy supports two types of cookie affinity:

"name": string
"ttl": .google.protobuf.Duration
"path": string

Field Type Description
name string required, the name of the cookie to be used to obtain the hash key.
ttl .google.protobuf.Duration If specified, a cookie with the TTL will be generated if the cookie is not present. If the TTL is present and zero, the generated cookie will be a session cookie.
path string The name of the path for the cookie. If no path is specified here, no path will be set for the cookie.

HashPolicy

Specifies an element of Envoy’s hashing policy for hashing load balancers

"header": string
"cookie": .lbhash.options.gloo.solo.io.Cookie
"sourceIp": bool
"terminal": bool

Field Type Description
header string Use a given header’s value as a component of the hashing load balancer’s hash key. Only one of header, cookie, or sourceIp can be set.
cookie .lbhash.options.gloo.solo.io.Cookie Use a given cookie as a component of the hashing load balancer’s hash key. Only one of cookie, header, or sourceIp can be set.
sourceIp bool Use the request’s source IP address as a component of the hashing load balancer’s hash key. Only one of sourceIp, header, or cookie can be set.
terminal bool If set, and a hash key is available after evaluating this policy, Envoy will skip the subsequent policies and use the key as it is. This is useful for defining “fallback” policies and limiting the time Envoy spends generating hash keys.