public static final class Cluster.LbSubsetConfig extends com.google.protobuf.GeneratedMessageV3 implements Cluster.LbSubsetConfigOrBuilder
Optionally divide the endpoints in this cluster into subsets defined by endpoint metadata and selected by route and weighted cluster metadata. [#next-free-field: 8]Protobuf type
envoy.api.v2.Cluster.LbSubsetConfig| Modifier and Type | Class and Description |
|---|---|
static class |
Cluster.LbSubsetConfig.Builder
Optionally divide the endpoints in this cluster into subsets defined by
endpoint metadata and selected by route and weighted cluster metadata.
|
static class |
Cluster.LbSubsetConfig.LbSubsetFallbackPolicy
If NO_FALLBACK is selected, a result
equivalent to no healthy hosts is reported.
|
static class |
Cluster.LbSubsetConfig.LbSubsetSelector
Specifications for subsets.
|
static interface |
Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SUBSET_FIELD_NUMBER |
static int |
FALLBACK_POLICY_FIELD_NUMBER |
static int |
LIST_AS_ANY_FIELD_NUMBER |
static int |
LOCALITY_WEIGHT_AWARE_FIELD_NUMBER |
static int |
PANIC_MODE_ANY_FIELD_NUMBER |
static int |
SCALE_LOCALITY_WEIGHT_FIELD_NUMBER |
static int |
SUBSET_SELECTORS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static Cluster.LbSubsetConfig |
getDefaultInstance() |
Cluster.LbSubsetConfig |
getDefaultInstanceForType() |
com.google.protobuf.Struct |
getDefaultSubset()
Specifies the default subset of endpoints used during fallback if
fallback_policy is
:ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
|
com.google.protobuf.StructOrBuilder |
getDefaultSubsetOrBuilder()
Specifies the default subset of endpoints used during fallback if
fallback_policy is
:ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
Cluster.LbSubsetConfig.LbSubsetFallbackPolicy |
getFallbackPolicy()
The behavior used when no endpoint subset matches the selected route's
metadata.
|
int |
getFallbackPolicyValue()
The behavior used when no endpoint subset matches the selected route's
metadata.
|
boolean |
getListAsAny()
If true, metadata specified for a metadata key will be matched against the corresponding
endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value
and any of the elements in the list matches the criteria.
|
boolean |
getLocalityWeightAware()
If true, routing to subsets will take into account the localities and locality weights of the
endpoints when making the routing decision.
|
boolean |
getPanicModeAny()
If true, when a fallback policy is configured and its corresponding subset fails to find
a host this will cause any host to be selected instead.
|
com.google.protobuf.Parser<Cluster.LbSubsetConfig> |
getParserForType() |
boolean |
getScaleLocalityWeight()
When used with locality_weight_aware, scales the weight of each locality by the ratio
of hosts in the subset vs hosts in the original subset.
|
int |
getSerializedSize() |
Cluster.LbSubsetConfig.LbSubsetSelector |
getSubsetSelectors(int index)
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value.
|
int |
getSubsetSelectorsCount()
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value.
|
List<Cluster.LbSubsetConfig.LbSubsetSelector> |
getSubsetSelectorsList()
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value.
|
Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder |
getSubsetSelectorsOrBuilder(int index)
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value.
|
List<? extends Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder> |
getSubsetSelectorsOrBuilderList()
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasDefaultSubset()
Specifies the default subset of endpoints used during fallback if
fallback_policy is
:ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static Cluster.LbSubsetConfig.Builder |
newBuilder() |
static Cluster.LbSubsetConfig.Builder |
newBuilder(Cluster.LbSubsetConfig prototype) |
Cluster.LbSubsetConfig.Builder |
newBuilderForType() |
protected Cluster.LbSubsetConfig.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static Cluster.LbSubsetConfig |
parseDelimitedFrom(InputStream input) |
static Cluster.LbSubsetConfig |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Cluster.LbSubsetConfig |
parseFrom(byte[] data) |
static Cluster.LbSubsetConfig |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Cluster.LbSubsetConfig |
parseFrom(ByteBuffer data) |
static Cluster.LbSubsetConfig |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Cluster.LbSubsetConfig |
parseFrom(com.google.protobuf.ByteString data) |
static Cluster.LbSubsetConfig |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Cluster.LbSubsetConfig |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Cluster.LbSubsetConfig |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Cluster.LbSubsetConfig |
parseFrom(InputStream input) |
static Cluster.LbSubsetConfig |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Cluster.LbSubsetConfig> |
parser() |
Cluster.LbSubsetConfig.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int FALLBACK_POLICY_FIELD_NUMBER
public static final int DEFAULT_SUBSET_FIELD_NUMBER
public static final int SUBSET_SELECTORS_FIELD_NUMBER
public static final int LOCALITY_WEIGHT_AWARE_FIELD_NUMBER
public static final int SCALE_LOCALITY_WEIGHT_FIELD_NUMBER
public static final int PANIC_MODE_ANY_FIELD_NUMBER
public static final int LIST_AS_ANY_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public int getFallbackPolicyValue()
The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }getFallbackPolicyValue in interface Cluster.LbSubsetConfigOrBuilderpublic Cluster.LbSubsetConfig.LbSubsetFallbackPolicy getFallbackPolicy()
The behavior used when no endpoint subset matches the selected route's metadata. The value defaults to :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }getFallbackPolicy in interface Cluster.LbSubsetConfigOrBuilderpublic boolean hasDefaultSubset()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;hasDefaultSubset in interface Cluster.LbSubsetConfigOrBuilderpublic com.google.protobuf.Struct getDefaultSubset()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;getDefaultSubset in interface Cluster.LbSubsetConfigOrBuilderpublic com.google.protobuf.StructOrBuilder getDefaultSubsetOrBuilder()
Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`. Each field in default_subset is compared to the matching LbEndpoint.Metadata under the *envoy.lb* namespace. It is valid for no hosts to match, in which case the behavior is the same as a fallback_policy of :ref:`NO_FALLBACK<envoy_api_enum_value_Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
.google.protobuf.Struct default_subset = 2;getDefaultSubsetOrBuilder in interface Cluster.LbSubsetConfigOrBuilderpublic List<Cluster.LbSubsetConfig.LbSubsetSelector> getSubsetSelectorsList()
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value. For example:
.. code-block:: json
{ "subset_selectors": [
{ "keys": [ "version" ] },
{ "keys": [ "stage", "hardware_type" ] }
]}
A subset is matched when the metadata from the selected route and
weighted cluster contains the same keys and values as the subset's
metadata. The same host may appear in multiple subsets.
repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;getSubsetSelectorsList in interface Cluster.LbSubsetConfigOrBuilderpublic List<? extends Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder> getSubsetSelectorsOrBuilderList()
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value. For example:
.. code-block:: json
{ "subset_selectors": [
{ "keys": [ "version" ] },
{ "keys": [ "stage", "hardware_type" ] }
]}
A subset is matched when the metadata from the selected route and
weighted cluster contains the same keys and values as the subset's
metadata. The same host may appear in multiple subsets.
repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;getSubsetSelectorsOrBuilderList in interface Cluster.LbSubsetConfigOrBuilderpublic int getSubsetSelectorsCount()
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value. For example:
.. code-block:: json
{ "subset_selectors": [
{ "keys": [ "version" ] },
{ "keys": [ "stage", "hardware_type" ] }
]}
A subset is matched when the metadata from the selected route and
weighted cluster contains the same keys and values as the subset's
metadata. The same host may appear in multiple subsets.
repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;getSubsetSelectorsCount in interface Cluster.LbSubsetConfigOrBuilderpublic Cluster.LbSubsetConfig.LbSubsetSelector getSubsetSelectors(int index)
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value. For example:
.. code-block:: json
{ "subset_selectors": [
{ "keys": [ "version" ] },
{ "keys": [ "stage", "hardware_type" ] }
]}
A subset is matched when the metadata from the selected route and
weighted cluster contains the same keys and values as the subset's
metadata. The same host may appear in multiple subsets.
repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;getSubsetSelectors in interface Cluster.LbSubsetConfigOrBuilderpublic Cluster.LbSubsetConfig.LbSubsetSelectorOrBuilder getSubsetSelectorsOrBuilder(int index)
For each entry, LbEndpoint.Metadata's
*envoy.lb* namespace is traversed and a subset is created for each unique
combination of key and value. For example:
.. code-block:: json
{ "subset_selectors": [
{ "keys": [ "version" ] },
{ "keys": [ "stage", "hardware_type" ] }
]}
A subset is matched when the metadata from the selected route and
weighted cluster contains the same keys and values as the subset's
metadata. The same host may appear in multiple subsets.
repeated .envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;getSubsetSelectorsOrBuilder in interface Cluster.LbSubsetConfigOrBuilderpublic boolean getLocalityWeightAware()
If true, routing to subsets will take into account the localities and locality weights of the endpoints when making the routing decision. There are some potential pitfalls associated with enabling this feature, as the resulting traffic split after applying both a subset match and locality weights might be undesirable. Consider for example a situation in which you have 50/50 split across two localities X/Y which have 100 hosts each without subsetting. If the subset LB results in X having only 1 host selected but Y having 100, then a lot more load is being dumped on the single host in X than originally anticipated in the load balancing assignment delivered via EDS.
bool locality_weight_aware = 4;getLocalityWeightAware in interface Cluster.LbSubsetConfigOrBuilderpublic boolean getScaleLocalityWeight()
When used with locality_weight_aware, scales the weight of each locality by the ratio of hosts in the subset vs hosts in the original subset. This aims to even out the load going to an individual locality if said locality is disproportionately affected by the subset predicate.
bool scale_locality_weight = 5;getScaleLocalityWeight in interface Cluster.LbSubsetConfigOrBuilderpublic boolean getPanicModeAny()
If true, when a fallback policy is configured and its corresponding subset fails to find a host this will cause any host to be selected instead. This is useful when using the default subset as the fallback policy, given the default subset might become empty. With this option enabled, if that happens the LB will attempt to select a host from the entire cluster.
bool panic_mode_any = 6;getPanicModeAny in interface Cluster.LbSubsetConfigOrBuilderpublic boolean getListAsAny()
If true, metadata specified for a metadata key will be matched against the corresponding endpoint metadata if the endpoint metadata matches the value exactly OR it is a list value and any of the elements in the list matches the criteria.
bool list_as_any = 7;getListAsAny in interface Cluster.LbSubsetConfigOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Cluster.LbSubsetConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Cluster.LbSubsetConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Cluster.LbSubsetConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Cluster.LbSubsetConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Cluster.LbSubsetConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Cluster.LbSubsetConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Cluster.LbSubsetConfig parseFrom(InputStream input) throws IOException
IOExceptionpublic static Cluster.LbSubsetConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Cluster.LbSubsetConfig parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static Cluster.LbSubsetConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static Cluster.LbSubsetConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static Cluster.LbSubsetConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic Cluster.LbSubsetConfig.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Cluster.LbSubsetConfig.Builder newBuilder()
public static Cluster.LbSubsetConfig.Builder newBuilder(Cluster.LbSubsetConfig prototype)
public Cluster.LbSubsetConfig.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Cluster.LbSubsetConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static Cluster.LbSubsetConfig getDefaultInstance()
public static com.google.protobuf.Parser<Cluster.LbSubsetConfig> parser()
public com.google.protobuf.Parser<Cluster.LbSubsetConfig> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public Cluster.LbSubsetConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.