类 DestinationRuleOuterClass.LocalityLoadBalancerSetting

  • 所有已实现的接口:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder, java.io.Serializable
    封闭类:
    DestinationRuleOuterClass

    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
    另请参阅:
    序列化表格
    • 构造器详细资料

      • LocalityLoadBalancerSetting

        private LocalityLoadBalancerSetting​(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
      • LocalityLoadBalancerSetting

        private LocalityLoadBalancerSetting()
    • 方法详细资料

      • newInstance

        protected java.lang.Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        覆盖:
        newInstance 在类中 com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        指定者:
        getUnknownFields 在接口中 com.google.protobuf.MessageOrBuilder
        覆盖:
        getUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        指定者:
        internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3
      • getDistributeCount

        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;
        指定者:
        getDistributeCount 在接口中 DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder
      • getFailoverCount

        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;
        指定者:
        getFailoverCount 在接口中 DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder
      • hasEnabled

        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.LocalityLoadBalancerSettingOrBuilder
        返回:
        Whether the enabled field is set.
      • getEnabled

        public 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.LocalityLoadBalancerSettingOrBuilder
        返回:
        The enabled.
      • getEnabledOrBuilder

        public 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;
        指定者:
        getEnabledOrBuilder 在接口中 DestinationRuleOuterClass.LocalityLoadBalancerSettingOrBuilder
      • isInitialized

        public final boolean isInitialized()
        指定者:
        isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilder
        覆盖:
        isInitialized 在类中 com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws java.io.IOException
        指定者:
        writeTo 在接口中 com.google.protobuf.MessageLite
        覆盖:
        writeTo 在类中 com.google.protobuf.GeneratedMessageV3
        抛出:
        java.io.IOException
      • getSerializedSize

        public int getSerializedSize()
        指定者:
        getSerializedSize 在接口中 com.google.protobuf.MessageLite
        覆盖:
        getSerializedSize 在类中 com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(java.lang.Object obj)
        指定者:
        equals 在接口中 com.google.protobuf.Message
        覆盖:
        equals 在类中 com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        指定者:
        hashCode 在接口中 com.google.protobuf.Message
        覆盖:
        hashCode 在类中 com.google.protobuf.AbstractMessage
      • parseFrom

        public static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom​(java.nio.ByteBuffer data,
                                                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                               throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom​(com.google.protobuf.ByteString data,
                                                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                               throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static DestinationRuleOuterClass.LocalityLoadBalancerSetting parseFrom​(byte[] data,
                                                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                                               throws com.google.protobuf.InvalidProtocolBufferException
        抛出:
        com.google.protobuf.InvalidProtocolBufferException
      • getParserForType

        public com.google.protobuf.Parser<DestinationRuleOuterClass.LocalityLoadBalancerSetting> getParserForType()
        指定者:
        getParserForType 在接口中 com.google.protobuf.Message
        指定者:
        getParserForType 在接口中 com.google.protobuf.MessageLite
        覆盖:
        getParserForType 在类中 com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public DestinationRuleOuterClass.LocalityLoadBalancerSetting getDefaultInstanceForType()
        指定者:
        getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuilder
        指定者:
        getDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilder