public static final class DestinationRuleOuterClass.LocalityLoadBalancerSetting extends com.google.protobuf.GeneratedMessageV3 implements DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder
Locality-weighted load balancing allows administrators to control the
distribution of traffic to endpoints based on the localities of where the
traffic originates and where it will terminate. These localities are
specified using arbitrary labels that designate a hierarchy of localities in
{region}/{zone}/{sub-zone} form. For additional detail refer to
[Locality Weight](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight)
The following example shows how to setup locality weights mesh-wide.
Given a mesh with workloads and their service deployed to "us-west/zone1/*"
and "us-west/zone2/*". This example specifies that when traffic accessing a
service originates from workloads in "us-west/zone1/*", 80% of the traffic
will be sent to endpoints in "us-west/zone1/*", i.e the same zone, and the
remaining 20% will go to endpoints in "us-west/zone2/*". This setup is
intended to favor routing traffic to endpoints in the same locality.
A similar setting is specified for traffic originating in "us-west/zone2/*".
```yaml
distribute:
- from: us-west/zone1/*
to:
"us-west/zone1/*": 80
"us-west/zone2/*": 20
- from: us-west/zone2/*
to:
"us-west/zone1/*": 20
"us-west/zone2/*": 80
```
If the goal of the operator is not to distribute load across zones and
regions but rather to restrict the regionality of failover to meet other
operational requirements an operator can set a 'failover' policy instead of
a 'distribute' policy.
The following example sets up a locality failover policy for regions.
Assume a service resides in zones within us-east, us-west & eu-west
this example specifies that when endpoints within us-east become unhealthy
traffic should failover to endpoints in any zone or sub-zone within eu-west
and similarly us-west should failover to us-east.
```yaml
failover:
- from: us-east
to: eu-west
- from: us-west
to: us-east
```
Locality load balancing settings.
Protobuf type istio.networking.v1alpha3.LocalityLoadBalancerSetting| 限定符和类型 | 类和说明 |
|---|---|
static class |
DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder
Locality-weighted load balancing allows administrators to control the
distribution of traffic to endpoints based on the localities of where the
traffic originates and where it will terminate.
|
static class |
DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute
Describes how traffic originating in the 'from' zone or sub-zone is
distributed over a set of 'to' zones.
|
static interface |
DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder |
static class |
DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover
Specify the traffic failover policy across regions.
|
static interface |
DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder |
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| 限定符和类型 | 字段和说明 |
|---|---|
static int |
DISTRIBUTE_FIELD_NUMBER |
static int |
ENABLED_FIELD_NUMBER |
static int |
FAILOVER_FIELD_NUMBER |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, 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, writeTopublic static final int DISTRIBUTE_FIELD_NUMBER
public static final int FAILOVER_FIELD_NUMBER
public static final int ENABLED_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance 在类中 com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields 在接口中 com.google.protobuf.MessageOrBuildergetUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3public List<DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute> getDistributeList()
Optional: only one of distribute or failover can be set. Explicitly specify loadbalancing weight across different zones and geographical locations. Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) If empty, the locality weight is set according to the endpoints number within it.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;public List<? extends DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder> getDistributeOrBuilderList()
Optional: only one of distribute or failover can be set. Explicitly specify loadbalancing weight across different zones and geographical locations. Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) If empty, the locality weight is set according to the endpoints number within it.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;public int getDistributeCount()
Optional: only one of distribute or failover can be set. Explicitly specify loadbalancing weight across different zones and geographical locations. Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) If empty, the locality weight is set according to the endpoints number within it.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;public DestinationRuleOuterClass.LocalityLoadBalancerSetting.Distribute getDistribute(int index)
Optional: only one of distribute or failover can be set. Explicitly specify loadbalancing weight across different zones and geographical locations. Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) If empty, the locality weight is set according to the endpoints number within it.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;public DestinationRuleOuterClass.LocalityLoadBalancerSetting.DistributeOrBuilder getDistributeOrBuilder(int index)
Optional: only one of distribute or failover can be set. Explicitly specify loadbalancing weight across different zones and geographical locations. Refer to [Locality weighted load balancing](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/locality_weight) If empty, the locality weight is set according to the endpoints number within it.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute distribute = 1;public List<DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover> getFailoverList()
Optional: only failover or distribute can be set. Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy. Should be used together with OutlierDetection to detect unhealthy endpoints. Note: if no OutlierDetection specified, this will not take effect.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;public List<? extends DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder> getFailoverOrBuilderList()
Optional: only failover or distribute can be set. Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy. Should be used together with OutlierDetection to detect unhealthy endpoints. Note: if no OutlierDetection specified, this will not take effect.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;public int getFailoverCount()
Optional: only failover or distribute can be set. Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy. Should be used together with OutlierDetection to detect unhealthy endpoints. Note: if no OutlierDetection specified, this will not take effect.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;public DestinationRuleOuterClass.LocalityLoadBalancerSetting.Failover getFailover(int index)
Optional: only failover or distribute can be set. Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy. Should be used together with OutlierDetection to detect unhealthy endpoints. Note: if no OutlierDetection specified, this will not take effect.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;public DestinationRuleOuterClass.LocalityLoadBalancerSetting.FailoverOrBuilder getFailoverOrBuilder(int index)
Optional: only failover or distribute can be set. Explicitly specify the region traffic will land on when endpoints in local region becomes unhealthy. Should be used together with OutlierDetection to detect unhealthy endpoints. Note: if no OutlierDetection specified, this will not take effect.
repeated .istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover failover = 2;public boolean hasEnabled()
enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
.google.protobuf.BoolValue enabled = 3;hasEnabled 在接口中 DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilderpublic com.google.protobuf.BoolValue getEnabled()
enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
.google.protobuf.BoolValue enabled = 3;getEnabled 在接口中 DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilderpublic com.google.protobuf.BoolValueOrBuilder getEnabledOrBuilder()
enable locality load balancing, this is DestinationRule-level and will override mesh wide settings in entirety. e.g. true means that turn on locality load balancing for this DestinationRule no matter what mesh wide settings is.
.google.protobuf.BoolValue enabled = 3;public final boolean isInitialized()
isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilderisInitialized 在类中 com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo 在接口中 com.google.protobuf.MessageLitewriteTo 在类中 com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize 在接口中 com.google.protobuf.MessageLitegetSerializedSize 在类中 com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals 在接口中 com.google.protobuf.Messageequals 在类中 com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode 在接口中 com.google.protobuf.MessagehashCode 在类中 com.google.protobuf.AbstractMessagepublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(InputStream input) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder newBuilderForType()
newBuilderForType 在接口中 com.google.protobuf.MessagenewBuilderForType 在接口中 com.google.protobuf.MessageLitepublic static DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder newBuilder()
public static DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder newBuilder(DestinationRuleOuterClass.LocalityLoadBalancerSetting prototype)
public DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder toBuilder()
toBuilder 在接口中 com.google.protobuf.MessagetoBuilder 在接口中 com.google.protobuf.MessageLiteprotected DestinationRuleOuterClass.LocalityLoadBalancerSetting.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3public static DestinationRuleOuterClass.LocalityLoadBalancerSetting getDefaultInstance()
public static com.google.protobuf.Parser<DestinationRuleOuterClass.LocalityLoadBalancerSetting> parser()
public com.google.protobuf.Parser<DestinationRuleOuterClass.LocalityLoadBalancerSetting> getParserForType()
getParserForType 在接口中 com.google.protobuf.MessagegetParserForType 在接口中 com.google.protobuf.MessageLitegetParserForType 在类中 com.google.protobuf.GeneratedMessageV3public DestinationRuleOuterClass.LocalityLoadBalancerSetting getDefaultInstanceForType()
getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilderCopyright © 2018–2023 Alibaba Group. All rights reserved.