Class OverrideHost
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,OverrideHostOrBuilder,Serializable
public final class OverrideHost
extends com.google.protobuf.GeneratedMessageV3
implements OverrideHostOrBuilder
Configuration for the Override Host Load Balancing policy.
This policy allows endpoint picking to be implemented in downstream HTTP filters. For example an ext_proc RPC to a service
that implements k8s proposal for AI gateway inferences extensions
https://github.com/kubernetes-sigs/gateway-api-inference-extension/tree/main/docs/proposals/004-endpoint-picker-protocol
can provide hosts for serving a request using Override Host load balancing policy.
This policy extracts selected override hosts from a list of ``OverrideHostSource`` (request headers, metadata, etc.).
The override host source must specify at least one host in ``IP:Port`` format or multiple hosts in ``IP:Port,IP:Port,...``
format. For example ``10.0.0.5:8080`` or ``[2600:4040:5204::1574:24ae]:80``. The IPv6 address is enclosed in square brackets.
For specific example, to support k8s gateway inference extensions, which uses the ``x-gateway-destination-endpoint``
header or metadata value under the "envoy.lb" key for selected hosts, the Override Host load balancing policy should be
configured in the following way:
.. code-block:: yaml
override_host_sources:
- header: "x-gateway-destination-endpoint"
- metadata:
key: "envoy.lb"
path:
- key: "x-gateway-destination-endpoint"
If no valid host in the override host list, then the specified fallback load balancing policy is used. This allows load
balancing to degrade to a a built in policy (i.e. Round Robin) in case external endpoint picker fails.
See the :ref:`load balancing architecture
overview<arch_overview_load_balancing_types>` for more information.
Protobuf type envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration for the Override Host Load Balancing policy.static final classProtobuf typeenvoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSourcestatic interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic OverrideHoststatic final com.google.protobuf.Descriptors.DescriptorThe child LB policy to use in case neither header nor metadata with selected hosts is present.The child LB policy to use in case neither header nor metadata with selected hosts is present.getOverrideHostSources(int index) A list of sources to get host addresses from.intA list of sources to get host addresses from.A list of sources to get host addresses from.getOverrideHostSourcesOrBuilder(int index) A list of sources to get host addresses from.List<? extends OverrideHost.OverrideHostSourceOrBuilder>A list of sources to get host addresses from.com.google.protobuf.Parser<OverrideHost>intbooleanThe child LB policy to use in case neither header nor metadata with selected hosts is present.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanstatic OverrideHost.Builderstatic OverrideHost.BuildernewBuilder(OverrideHost prototype) protected OverrideHost.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) static OverrideHostparseDelimitedFrom(InputStream input) static OverrideHostparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OverrideHostparseFrom(byte[] data) static OverrideHostparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OverrideHostparseFrom(com.google.protobuf.ByteString data) static OverrideHostparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OverrideHostparseFrom(com.google.protobuf.CodedInputStream input) static OverrideHostparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OverrideHostparseFrom(InputStream input) static OverrideHostparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static OverrideHostparseFrom(ByteBuffer data) static OverrideHostparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<OverrideHost>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
OVERRIDE_HOST_SOURCES_FIELD_NUMBER
public static final int OVERRIDE_HOST_SOURCES_FIELD_NUMBER- See Also:
-
FALLBACK_POLICY_FIELD_NUMBER
public static final int FALLBACK_POLICY_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getOverrideHostSourcesList
A list of sources to get host addresses from. The host sources are searched in the order specified. The request is forwarded to the first address and subsequent addresses are used for request retries or hedging. Note that if an overridden host address is not present in the current endpoint set, it is skipped and the next found address is used. If there are not enough overridden addresses to satisfy all retry attempts the fallback load balancing policy is used to pick a host.
repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }- Specified by:
getOverrideHostSourcesListin interfaceOverrideHostOrBuilder
-
getOverrideHostSourcesOrBuilderList
public List<? extends OverrideHost.OverrideHostSourceOrBuilder> getOverrideHostSourcesOrBuilderList()A list of sources to get host addresses from. The host sources are searched in the order specified. The request is forwarded to the first address and subsequent addresses are used for request retries or hedging. Note that if an overridden host address is not present in the current endpoint set, it is skipped and the next found address is used. If there are not enough overridden addresses to satisfy all retry attempts the fallback load balancing policy is used to pick a host.
repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }- Specified by:
getOverrideHostSourcesOrBuilderListin interfaceOverrideHostOrBuilder
-
getOverrideHostSourcesCount
public int getOverrideHostSourcesCount()A list of sources to get host addresses from. The host sources are searched in the order specified. The request is forwarded to the first address and subsequent addresses are used for request retries or hedging. Note that if an overridden host address is not present in the current endpoint set, it is skipped and the next found address is used. If there are not enough overridden addresses to satisfy all retry attempts the fallback load balancing policy is used to pick a host.
repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }- Specified by:
getOverrideHostSourcesCountin interfaceOverrideHostOrBuilder
-
getOverrideHostSources
A list of sources to get host addresses from. The host sources are searched in the order specified. The request is forwarded to the first address and subsequent addresses are used for request retries or hedging. Note that if an overridden host address is not present in the current endpoint set, it is skipped and the next found address is used. If there are not enough overridden addresses to satisfy all retry attempts the fallback load balancing policy is used to pick a host.
repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }- Specified by:
getOverrideHostSourcesin interfaceOverrideHostOrBuilder
-
getOverrideHostSourcesOrBuilder
A list of sources to get host addresses from. The host sources are searched in the order specified. The request is forwarded to the first address and subsequent addresses are used for request retries or hedging. Note that if an overridden host address is not present in the current endpoint set, it is skipped and the next found address is used. If there are not enough overridden addresses to satisfy all retry attempts the fallback load balancing policy is used to pick a host.
repeated .envoy.extensions.load_balancing_policies.override_host.v3.OverrideHost.OverrideHostSource override_host_sources = 1 [(.validate.rules) = { ... }- Specified by:
getOverrideHostSourcesOrBuilderin interfaceOverrideHostOrBuilder
-
hasFallbackPolicy
public boolean hasFallbackPolicy()The child LB policy to use in case neither header nor metadata with selected hosts is present.
.envoy.config.cluster.v3.LoadBalancingPolicy fallback_policy = 3 [(.validate.rules) = { ... }- Specified by:
hasFallbackPolicyin interfaceOverrideHostOrBuilder- Returns:
- Whether the fallbackPolicy field is set.
-
getFallbackPolicy
The child LB policy to use in case neither header nor metadata with selected hosts is present.
.envoy.config.cluster.v3.LoadBalancingPolicy fallback_policy = 3 [(.validate.rules) = { ... }- Specified by:
getFallbackPolicyin interfaceOverrideHostOrBuilder- Returns:
- The fallbackPolicy.
-
getFallbackPolicyOrBuilder
The child LB policy to use in case neither header nor metadata with selected hosts is present.
.envoy.config.cluster.v3.LoadBalancingPolicy fallback_policy = 3 [(.validate.rules) = { ... }- Specified by:
getFallbackPolicyOrBuilderin interfaceOverrideHostOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static OverrideHost parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OverrideHost parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OverrideHost parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OverrideHost parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OverrideHost parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static OverrideHost parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static OverrideHost parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static OverrideHost parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static OverrideHost parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected OverrideHost.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-