Interface Cluster.LbSubsetConfigOrBuilder

  • All Superinterfaces:
    com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
    All Known Implementing Classes:
    Cluster.LbSubsetConfig, Cluster.LbSubsetConfig.Builder
    Enclosing class:
    Cluster

    public static interface Cluster.LbSubsetConfigOrBuilder
    extends com.google.protobuf.MessageOrBuilder
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.google.protobuf.Struct getDefaultSubset()
      Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.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_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
      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.
      Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy getMetadataFallbackPolicy()
      Fallback mechanism that allows to try different route metadata until a host is found.
      int getMetadataFallbackPolicyValue()
      Fallback mechanism that allows to try different route metadata until a host is found.
      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.
      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.
      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.
      java.util.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.
      java.util.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.
      boolean hasDefaultSubset()
      Specifies the default subset of endpoints used during fallback if fallback_policy is :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.DEFAULT_SUBSET>`.
      • 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 Detail

      • getFallbackPolicyValue

        int getFallbackPolicyValue()
         The behavior used when no endpoint subset matches the selected route's
         metadata. The value defaults to
         :ref:`NO_FALLBACK<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
         
        .envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }
        Returns:
        The enum numeric value on the wire for fallbackPolicy.
      • getFallbackPolicy

        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_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
         
        .envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy fallback_policy = 1 [(.validate.rules) = { ... }
        Returns:
        The fallbackPolicy.
      • hasDefaultSubset

        boolean hasDefaultSubset()
         Specifies the default subset of endpoints used during fallback if
         fallback_policy is
         :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.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_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
         
        .google.protobuf.Struct default_subset = 2;
        Returns:
        Whether the defaultSubset field is set.
      • getDefaultSubset

        com.google.protobuf.Struct getDefaultSubset()
         Specifies the default subset of endpoints used during fallback if
         fallback_policy is
         :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.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_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
         
        .google.protobuf.Struct default_subset = 2;
        Returns:
        The defaultSubset.
      • getDefaultSubsetOrBuilder

        com.google.protobuf.StructOrBuilder getDefaultSubsetOrBuilder()
         Specifies the default subset of endpoints used during fallback if
         fallback_policy is
         :ref:`DEFAULT_SUBSET<envoy_v3_api_enum_value_config.cluster.v3.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_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetFallbackPolicy.NO_FALLBACK>`.
         
        .google.protobuf.Struct default_subset = 2;
      • getSubsetSelectorsList

        java.util.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.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
      • getSubsetSelectors

        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.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
      • getSubsetSelectorsCount

        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.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
      • getSubsetSelectorsOrBuilderList

        java.util.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.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
      • getSubsetSelectorsOrBuilder

        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.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector subset_selectors = 3;
      • getLocalityWeightAware

        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;
        Returns:
        The localityWeightAware.
      • getScaleLocalityWeight

        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;
        Returns:
        The scaleLocalityWeight.
      • getPanicModeAny

        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;
        Returns:
        The panicModeAny.
      • getListAsAny

        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;
        Returns:
        The listAsAny.
      • getMetadataFallbackPolicyValue

        int getMetadataFallbackPolicyValue()
         Fallback mechanism that allows to try different route metadata until a host is found.
         If load balancing process, including all its mechanisms (like
         :ref:`fallback_policy<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.fallback_policy>`)
         fails to select a host, this policy decides if and how the process is repeated using another metadata.
        
         The value defaults to
         :ref:`METADATA_NO_FALLBACK<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
         
        .envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 [(.validate.rules) = { ... }
        Returns:
        The enum numeric value on the wire for metadataFallbackPolicy.
      • getMetadataFallbackPolicy

        Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy getMetadataFallbackPolicy()
         Fallback mechanism that allows to try different route metadata until a host is found.
         If load balancing process, including all its mechanisms (like
         :ref:`fallback_policy<envoy_v3_api_field_config.cluster.v3.Cluster.LbSubsetConfig.fallback_policy>`)
         fails to select a host, this policy decides if and how the process is repeated using another metadata.
        
         The value defaults to
         :ref:`METADATA_NO_FALLBACK<envoy_v3_api_enum_value_config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy.METADATA_NO_FALLBACK>`.
         
        .envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy metadata_fallback_policy = 8 [(.validate.rules) = { ... }
        Returns:
        The metadataFallbackPolicy.