public static final class DestinationRuleOuterClass.OutlierDetection extends com.google.protobuf.GeneratedMessageV3 implements DestinationRuleOuterClass.OutlierDetectionOrBuilder
A Circuit breaker implementation that tracks the status of each
individual host in the upstream service. Applicable to both HTTP and
TCP services. For HTTP services, hosts that continually return 5xx
errors for API calls are ejected from the pool for a pre-defined period
of time. For TCP services, connection timeouts or connection
failures to a given host counts as an error when measuring the
consecutive errors metric. See Envoy's [outlier
detection](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/outlier)
for more details.
The following rule sets a connection pool size of 100 HTTP1 connections
with no more than 10 req/connection to the "reviews" service. In addition,
it sets a limit of 1000 concurrent HTTP2 requests and configures upstream
hosts to be scanned every 5 mins so that any host that fails 7 consecutive
times with a 502, 503, or 504 error code will be ejected for 15 minutes.
{{<tabset category-name="example">}}
{{<tab name="v1alpha3" category-value="v1alpha3">}}
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: reviews-cb-policy
spec:
host: reviews.prod.svc.cluster.local
trafficPolicy:
connectionPool:
tcp:
maxConnections: 100
http:
http2MaxRequests: 1000
maxRequestsPerConnection: 10
outlierDetection:
consecutiveErrors: 7
interval: 5m
baseEjectionTime: 15m
```
{{</tab>}}
{{<tab name="v1beta1" category-value="v1beta1">}}
```yaml
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
name: reviews-cb-policy
spec:
host: reviews.prod.svc.cluster.local
trafficPolicy:
connectionPool:
tcp:
maxConnections: 100
http:
http2MaxRequests: 1000
maxRequestsPerConnection: 10
outlierDetection:
consecutiveErrors: 7
interval: 5m
baseEjectionTime: 15m
```
{{</tab>}}
{{</tabset>}}
Protobuf type istio.networking.v1alpha3.OutlierDetection| 限定符和类型 | 类和说明 |
|---|---|
static class |
DestinationRuleOuterClass.OutlierDetection.Builder
A Circuit breaker implementation that tracks the status of each
individual host in the upstream service.
|
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 |
BASE_EJECTION_TIME_FIELD_NUMBER |
static int |
CONSECUTIVE_5XX_ERRORS_FIELD_NUMBER |
static int |
CONSECUTIVE_ERRORS_FIELD_NUMBER |
static int |
CONSECUTIVE_GATEWAY_ERRORS_FIELD_NUMBER |
static int |
INTERVAL_FIELD_NUMBER |
static int |
MAX_EJECTION_PERCENT_FIELD_NUMBER |
static int |
MIN_HEALTH_PERCENT_FIELD_NUMBER |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object obj) |
com.google.protobuf.Duration |
getBaseEjectionTime()
Minimum ejection duration.
|
com.google.protobuf.DurationOrBuilder |
getBaseEjectionTimeOrBuilder()
Minimum ejection duration.
|
com.google.protobuf.UInt32Value |
getConsecutive5XxErrors()
Number of 5xx errors before a host is ejected from the connection pool.
|
com.google.protobuf.UInt32ValueOrBuilder |
getConsecutive5XxErrorsOrBuilder()
Number of 5xx errors before a host is ejected from the connection pool.
|
int |
getConsecutiveErrors()
已过时。
istio.networking.v1alpha3.OutlierDetection.consecutive_errors is deprecated.
See networking/v1alpha3/destination_rule.proto;l=724
|
com.google.protobuf.UInt32Value |
getConsecutiveGatewayErrors()
Number of gateway errors before a host is ejected from the connection pool.
|
com.google.protobuf.UInt32ValueOrBuilder |
getConsecutiveGatewayErrorsOrBuilder()
Number of gateway errors before a host is ejected from the connection pool.
|
static DestinationRuleOuterClass.OutlierDetection |
getDefaultInstance() |
DestinationRuleOuterClass.OutlierDetection |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Duration |
getInterval()
Time interval between ejection sweep analysis. format:
1h/1m/1s/1ms.
|
com.google.protobuf.DurationOrBuilder |
getIntervalOrBuilder()
Time interval between ejection sweep analysis. format:
1h/1m/1s/1ms.
|
int |
getMaxEjectionPercent()
Maximum % of hosts in the load balancing pool for the upstream
service that can be ejected.
|
int |
getMinHealthPercent()
Outlier detection will be enabled as long as the associated load balancing
pool has at least min_health_percent hosts in healthy mode.
|
com.google.protobuf.Parser<DestinationRuleOuterClass.OutlierDetection> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasBaseEjectionTime()
Minimum ejection duration.
|
boolean |
hasConsecutive5XxErrors()
Number of 5xx errors before a host is ejected from the connection pool.
|
boolean |
hasConsecutiveGatewayErrors()
Number of gateway errors before a host is ejected from the connection pool.
|
int |
hashCode() |
boolean |
hasInterval()
Time interval between ejection sweep analysis. format:
1h/1m/1s/1ms.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static DestinationRuleOuterClass.OutlierDetection.Builder |
newBuilder() |
static DestinationRuleOuterClass.OutlierDetection.Builder |
newBuilder(DestinationRuleOuterClass.OutlierDetection prototype) |
DestinationRuleOuterClass.OutlierDetection.Builder |
newBuilderForType() |
protected DestinationRuleOuterClass.OutlierDetection.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static DestinationRuleOuterClass.OutlierDetection |
parseDelimitedFrom(InputStream input) |
static DestinationRuleOuterClass.OutlierDetection |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(byte[] data) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(ByteBuffer data) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(com.google.protobuf.ByteString data) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(com.google.protobuf.CodedInputStream input) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(InputStream input) |
static DestinationRuleOuterClass.OutlierDetection |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<DestinationRuleOuterClass.OutlierDetection> |
parser() |
DestinationRuleOuterClass.OutlierDetection.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, 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 CONSECUTIVE_ERRORS_FIELD_NUMBER
public static final int CONSECUTIVE_GATEWAY_ERRORS_FIELD_NUMBER
public static final int CONSECUTIVE_5XX_ERRORS_FIELD_NUMBER
public static final int INTERVAL_FIELD_NUMBER
public static final int BASE_EJECTION_TIME_FIELD_NUMBER
public static final int MAX_EJECTION_PERCENT_FIELD_NUMBER
public static final int MIN_HEALTH_PERCENT_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.GeneratedMessageV3@Deprecated public int getConsecutiveErrors()
Number of errors before a host is ejected from the connection pool. Defaults to 5. When the upstream host is accessed over HTTP, a 502, 503, or 504 return code qualifies as an error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as an error. $hide_from_docs
int32 consecutive_errors = 1 [deprecated = true];getConsecutiveErrors 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic boolean hasConsecutiveGatewayErrors()
Number of gateway errors before a host is ejected from the connection pool. When the upstream host is accessed over HTTP, a 502, 503, or 504 return code qualifies as a gateway error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as a gateway error. This feature is disabled by default or when set to the value 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
.google.protobuf.UInt32Value consecutive_gateway_errors = 6;hasConsecutiveGatewayErrors 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.UInt32Value getConsecutiveGatewayErrors()
Number of gateway errors before a host is ejected from the connection pool. When the upstream host is accessed over HTTP, a 502, 503, or 504 return code qualifies as a gateway error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as a gateway error. This feature is disabled by default or when set to the value 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
.google.protobuf.UInt32Value consecutive_gateway_errors = 6;getConsecutiveGatewayErrors 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.UInt32ValueOrBuilder getConsecutiveGatewayErrorsOrBuilder()
Number of gateway errors before a host is ejected from the connection pool. When the upstream host is accessed over HTTP, a 502, 503, or 504 return code qualifies as a gateway error. When the upstream host is accessed over an opaque TCP connection, connect timeouts and connection error/failure events qualify as a gateway error. This feature is disabled by default or when set to the value 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
.google.protobuf.UInt32Value consecutive_gateway_errors = 6;public boolean hasConsecutive5XxErrors()
Number of 5xx errors before a host is ejected from the connection pool. When the upstream host is accessed over an opaque TCP connection, connect timeouts, connection error/failure and request failure events qualify as a 5xx error. This feature defaults to 5 but can be disabled by setting the value to 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
.google.protobuf.UInt32Value consecutive_5xx_errors = 7;hasConsecutive5XxErrors 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.UInt32Value getConsecutive5XxErrors()
Number of 5xx errors before a host is ejected from the connection pool. When the upstream host is accessed over an opaque TCP connection, connect timeouts, connection error/failure and request failure events qualify as a 5xx error. This feature defaults to 5 but can be disabled by setting the value to 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
.google.protobuf.UInt32Value consecutive_5xx_errors = 7;getConsecutive5XxErrors 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.UInt32ValueOrBuilder getConsecutive5XxErrorsOrBuilder()
Number of 5xx errors before a host is ejected from the connection pool. When the upstream host is accessed over an opaque TCP connection, connect timeouts, connection error/failure and request failure events qualify as a 5xx error. This feature defaults to 5 but can be disabled by setting the value to 0. Note that consecutive_gateway_errors and consecutive_5xx_errors can be used separately or together. Because the errors counted by consecutive_gateway_errors are also included in consecutive_5xx_errors, if the value of consecutive_gateway_errors is greater than or equal to the value of consecutive_5xx_errors, consecutive_gateway_errors will have no effect.
.google.protobuf.UInt32Value consecutive_5xx_errors = 7;public boolean hasInterval()
Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
.google.protobuf.Duration interval = 2;hasInterval 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.Duration getInterval()
Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
.google.protobuf.Duration interval = 2;getInterval 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.DurationOrBuilder getIntervalOrBuilder()
Time interval between ejection sweep analysis. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 10s.
.google.protobuf.Duration interval = 2;public boolean hasBaseEjectionTime()
Minimum ejection duration. A host will remain ejected for a period equal to the product of minimum ejection duration and the number of times the host has been ejected. This technique allows the system to automatically increase the ejection period for unhealthy upstream servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
.google.protobuf.Duration base_ejection_time = 3;hasBaseEjectionTime 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.Duration getBaseEjectionTime()
Minimum ejection duration. A host will remain ejected for a period equal to the product of minimum ejection duration and the number of times the host has been ejected. This technique allows the system to automatically increase the ejection period for unhealthy upstream servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
.google.protobuf.Duration base_ejection_time = 3;getBaseEjectionTime 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic com.google.protobuf.DurationOrBuilder getBaseEjectionTimeOrBuilder()
Minimum ejection duration. A host will remain ejected for a period equal to the product of minimum ejection duration and the number of times the host has been ejected. This technique allows the system to automatically increase the ejection period for unhealthy upstream servers. format: 1h/1m/1s/1ms. MUST BE >=1ms. Default is 30s.
.google.protobuf.Duration base_ejection_time = 3;public int getMaxEjectionPercent()
Maximum % of hosts in the load balancing pool for the upstream service that can be ejected. Defaults to 10%.
int32 max_ejection_percent = 4;getMaxEjectionPercent 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic int getMinHealthPercent()
Outlier detection will be enabled as long as the associated load balancing pool has at least min_health_percent hosts in healthy mode. When the percentage of healthy hosts in the load balancing pool drops below this threshold, outlier detection will be disabled and the proxy will load balance across all hosts in the pool (healthy and unhealthy). The threshold can be disabled by setting it to 0%. The default is 0% as it's not typically applicable in k8s environments with few pods per service.
int32 min_health_percent = 5;getMinHealthPercent 在接口中 DestinationRuleOuterClass.OutlierDetectionOrBuilderpublic 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.OutlierDetection parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(InputStream input) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static DestinationRuleOuterClass.OutlierDetection parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic DestinationRuleOuterClass.OutlierDetection.Builder newBuilderForType()
newBuilderForType 在接口中 com.google.protobuf.MessagenewBuilderForType 在接口中 com.google.protobuf.MessageLitepublic static DestinationRuleOuterClass.OutlierDetection.Builder newBuilder()
public static DestinationRuleOuterClass.OutlierDetection.Builder newBuilder(DestinationRuleOuterClass.OutlierDetection prototype)
public DestinationRuleOuterClass.OutlierDetection.Builder toBuilder()
toBuilder 在接口中 com.google.protobuf.MessagetoBuilder 在接口中 com.google.protobuf.MessageLiteprotected DestinationRuleOuterClass.OutlierDetection.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3public static DestinationRuleOuterClass.OutlierDetection getDefaultInstance()
public static com.google.protobuf.Parser<DestinationRuleOuterClass.OutlierDetection> parser()
public com.google.protobuf.Parser<DestinationRuleOuterClass.OutlierDetection> getParserForType()
getParserForType 在接口中 com.google.protobuf.MessagegetParserForType 在接口中 com.google.protobuf.MessageLitegetParserForType 在类中 com.google.protobuf.GeneratedMessageV3public DestinationRuleOuterClass.OutlierDetection getDefaultInstanceForType()
getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilderCopyright © 2018–2023 Alibaba Group. All rights reserved.