pub struct HTTPRouteRulesRetry {
pub attempts: Option<i64>,
pub backoff: Option<String>,
pub codes: Option<Vec<i64>>,
}
Expand description
Retry defines the configuration for when to retry an HTTP request.
Support: Extended
Fields§
§attempts: Option<i64>
Attempts specifies the maxmimum number of times an individual request from the gateway to a backend should be retried.
If the maximum number of retries has been attempted without a successful response from the backend, the Gateway MUST return an error.
When this field is unspecified, the number of times to attempt to retry a backend request is implementation-specific.
Support: Extended
backoff: Option<String>
Backoff specifies the minimum duration a Gateway should wait between retry attempts and is represented in Gateway API Duration formatting.
For example, setting the rules[].retry.backoff
field to the value
100ms
will cause a backend request to first be retried approximately
100 milliseconds after timing out or receiving a response code configured
to be retryable.
An implementation MAY use an exponential or alternative backoff strategy for subsequent retry attempts, MAY cap the maximum backoff duration to some amount greater than the specified minimum, and MAY add arbitrary jitter to stagger requests, as long as unsuccessful backend requests are not retried before the configured minimum duration.
If a Request timeout (rules[].timeouts.request
) is configured on the
route, the entire duration of the initial request and any retry attempts
MUST not exceed the Request timeout duration. If any retry attempts are
still in progress when the Request timeout duration has been reached,
these SHOULD be canceled if possible and the Gateway MUST immediately
return a timeout error.
If a BackendRequest timeout (rules[].timeouts.backendRequest
) is
configured on the route, any retry attempts which reach the configured
BackendRequest timeout duration without a response SHOULD be canceled if
possible and the Gateway should wait for at least the specified backoff
duration before attempting to retry the backend request again.
If a BackendRequest timeout is not configured on the route, retry attempts MAY time out after an implementation default duration, or MAY remain pending until a configured Request timeout or implementation default duration for total request time is reached.
When this field is unspecified, the time to wait between retry attempts is implementation-specific.
Support: Extended
codes: Option<Vec<i64>>
Codes defines the HTTP response status codes for which a backend request should be retried.
Support: Extended
Trait Implementations§
Source§impl Clone for HTTPRouteRulesRetry
impl Clone for HTTPRouteRulesRetry
Source§fn clone(&self) -> HTTPRouteRulesRetry
fn clone(&self) -> HTTPRouteRulesRetry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for HTTPRouteRulesRetry
impl Debug for HTTPRouteRulesRetry
Source§impl Default for HTTPRouteRulesRetry
impl Default for HTTPRouteRulesRetry
Source§fn default() -> HTTPRouteRulesRetry
fn default() -> HTTPRouteRulesRetry
Source§impl<'de> Deserialize<'de> for HTTPRouteRulesRetry
impl<'de> Deserialize<'de> for HTTPRouteRulesRetry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for HTTPRouteRulesRetry
impl JsonSchema for HTTPRouteRulesRetry
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl PartialEq for HTTPRouteRulesRetry
impl PartialEq for HTTPRouteRulesRetry
Source§impl Serialize for HTTPRouteRulesRetry
impl Serialize for HTTPRouteRulesRetry
impl StructuralPartialEq for HTTPRouteRulesRetry
Auto Trait Implementations§
impl Freeze for HTTPRouteRulesRetry
impl RefUnwindSafe for HTTPRouteRulesRetry
impl Send for HTTPRouteRulesRetry
impl Sync for HTTPRouteRulesRetry
impl Unpin for HTTPRouteRulesRetry
impl UnwindSafe for HTTPRouteRulesRetry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more