public static final class RetryPolicy.RateLimitedRetryBackOff extends com.google.protobuf.GeneratedMessageV3 implements RetryPolicy.RateLimitedRetryBackOffOrBuilder
A retry back-off strategy that applies when the upstream server rate limits
the request.
Given this configuration:
.. code-block:: yaml
rate_limited_retry_back_off:
reset_headers:
- name: Retry-After
format: SECONDS
- name: X-RateLimit-Reset
format: UNIX_TIMESTAMP
max_interval: "300s"
The following algorithm will apply:
1. If the response contains the header ``Retry-After`` its value must be on
the form ``120`` (an integer that represents the number of seconds to
wait before retrying). If so, this value is used as the back-off interval.
2. Otherwise, if the response contains the header ``X-RateLimit-Reset`` its
value must be on the form ``1595320702`` (an integer that represents the
point in time at which to retry, as a Unix timestamp in seconds). If so,
the current time is subtracted from this value and the result is used as
the back-off interval.
3. Otherwise, Envoy will use the default
:ref:`exponential back-off <envoy_v3_api_field_config.route.v3.RetryPolicy.retry_back_off>`
strategy.
No matter which format is used, if the resulting back-off interval exceeds
``max_interval`` it is discarded and the next header in ``reset_headers``
is tried. If a request timeout is configured for the route it will further
limit how long the request will be allowed to run.
To prevent many clients retrying at the same point in time jitter is added
to the back-off interval, so the resulting interval is decided by taking:
``random(interval, interval * 1.5)``.
.. attention::
Configuring ``rate_limited_retry_back_off`` will not by itself cause a request
to be retried. You will still need to configure the right retry policy to match
the responses from the upstream server.
Protobuf type envoy.config.route.v4alpha.RetryPolicy.RateLimitedRetryBackOff| Modifier and Type | Class and Description |
|---|---|
static class |
RetryPolicy.RateLimitedRetryBackOff.Builder
A retry back-off strategy that applies when the upstream server rate limits
the request.
|
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 |
MAX_INTERVAL_FIELD_NUMBER |
static int |
RESET_HEADERS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static RetryPolicy.RateLimitedRetryBackOff |
getDefaultInstance() |
RetryPolicy.RateLimitedRetryBackOff |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Duration |
getMaxInterval()
Specifies the maximum back off interval that Envoy will allow.
|
com.google.protobuf.DurationOrBuilder |
getMaxIntervalOrBuilder()
Specifies the maximum back off interval that Envoy will allow.
|
com.google.protobuf.Parser<RetryPolicy.RateLimitedRetryBackOff> |
getParserForType() |
RetryPolicy.ResetHeader |
getResetHeaders(int index)
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``)
to match against the response.
|
int |
getResetHeadersCount()
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``)
to match against the response.
|
List<RetryPolicy.ResetHeader> |
getResetHeadersList()
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``)
to match against the response.
|
RetryPolicy.ResetHeaderOrBuilder |
getResetHeadersOrBuilder(int index)
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``)
to match against the response.
|
List<? extends RetryPolicy.ResetHeaderOrBuilder> |
getResetHeadersOrBuilderList()
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``)
to match against the response.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
boolean |
hasMaxInterval()
Specifies the maximum back off interval that Envoy will allow.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static RetryPolicy.RateLimitedRetryBackOff.Builder |
newBuilder() |
static RetryPolicy.RateLimitedRetryBackOff.Builder |
newBuilder(RetryPolicy.RateLimitedRetryBackOff prototype) |
RetryPolicy.RateLimitedRetryBackOff.Builder |
newBuilderForType() |
protected RetryPolicy.RateLimitedRetryBackOff.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static RetryPolicy.RateLimitedRetryBackOff |
parseDelimitedFrom(InputStream input) |
static RetryPolicy.RateLimitedRetryBackOff |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(byte[] data) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(ByteBuffer data) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(com.google.protobuf.ByteString data) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(com.google.protobuf.CodedInputStream input) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(InputStream input) |
static RetryPolicy.RateLimitedRetryBackOff |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<RetryPolicy.RateLimitedRetryBackOff> |
parser() |
RetryPolicy.RateLimitedRetryBackOff.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 RESET_HEADERS_FIELD_NUMBER
public static final int MAX_INTERVAL_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 List<RetryPolicy.ResetHeader> getResetHeadersList()
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) to match against the response. Headers are tried in order, and matched case insensitive. The first header to be parsed successfully is used. If no headers match the default exponential back-off is used instead.
repeated .envoy.config.route.v4alpha.RetryPolicy.ResetHeader reset_headers = 1 [(.validate.rules) = { ... }getResetHeadersList in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic List<? extends RetryPolicy.ResetHeaderOrBuilder> getResetHeadersOrBuilderList()
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) to match against the response. Headers are tried in order, and matched case insensitive. The first header to be parsed successfully is used. If no headers match the default exponential back-off is used instead.
repeated .envoy.config.route.v4alpha.RetryPolicy.ResetHeader reset_headers = 1 [(.validate.rules) = { ... }getResetHeadersOrBuilderList in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic int getResetHeadersCount()
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) to match against the response. Headers are tried in order, and matched case insensitive. The first header to be parsed successfully is used. If no headers match the default exponential back-off is used instead.
repeated .envoy.config.route.v4alpha.RetryPolicy.ResetHeader reset_headers = 1 [(.validate.rules) = { ... }getResetHeadersCount in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic RetryPolicy.ResetHeader getResetHeaders(int index)
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) to match against the response. Headers are tried in order, and matched case insensitive. The first header to be parsed successfully is used. If no headers match the default exponential back-off is used instead.
repeated .envoy.config.route.v4alpha.RetryPolicy.ResetHeader reset_headers = 1 [(.validate.rules) = { ... }getResetHeaders in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic RetryPolicy.ResetHeaderOrBuilder getResetHeadersOrBuilder(int index)
Specifies the reset headers (like ``Retry-After`` or ``X-RateLimit-Reset``) to match against the response. Headers are tried in order, and matched case insensitive. The first header to be parsed successfully is used. If no headers match the default exponential back-off is used instead.
repeated .envoy.config.route.v4alpha.RetryPolicy.ResetHeader reset_headers = 1 [(.validate.rules) = { ... }getResetHeadersOrBuilder in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic boolean hasMaxInterval()
Specifies the maximum back off interval that Envoy will allow. If a reset header contains an interval longer than this then it will be discarded and the next header will be tried. Defaults to 300 seconds.
.google.protobuf.Duration max_interval = 2 [(.validate.rules) = { ... }hasMaxInterval in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic com.google.protobuf.Duration getMaxInterval()
Specifies the maximum back off interval that Envoy will allow. If a reset header contains an interval longer than this then it will be discarded and the next header will be tried. Defaults to 300 seconds.
.google.protobuf.Duration max_interval = 2 [(.validate.rules) = { ... }getMaxInterval in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic com.google.protobuf.DurationOrBuilder getMaxIntervalOrBuilder()
Specifies the maximum back off interval that Envoy will allow. If a reset header contains an interval longer than this then it will be discarded and the next header will be tried. Defaults to 300 seconds.
.google.protobuf.Duration max_interval = 2 [(.validate.rules) = { ... }getMaxIntervalOrBuilder in interface RetryPolicy.RateLimitedRetryBackOffOrBuilderpublic 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 RetryPolicy.RateLimitedRetryBackOff parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(InputStream input) throws IOException
IOExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static RetryPolicy.RateLimitedRetryBackOff parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic RetryPolicy.RateLimitedRetryBackOff.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static RetryPolicy.RateLimitedRetryBackOff.Builder newBuilder()
public static RetryPolicy.RateLimitedRetryBackOff.Builder newBuilder(RetryPolicy.RateLimitedRetryBackOff prototype)
public RetryPolicy.RateLimitedRetryBackOff.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected RetryPolicy.RateLimitedRetryBackOff.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static RetryPolicy.RateLimitedRetryBackOff getDefaultInstance()
public static com.google.protobuf.Parser<RetryPolicy.RateLimitedRetryBackOff> parser()
public com.google.protobuf.Parser<RetryPolicy.RateLimitedRetryBackOff> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public RetryPolicy.RateLimitedRetryBackOff getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.