Enum HttpRetryEvent
HTTP events on which to retry.
Namespace: Amazon.CDK.AWS.AppMesh
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum HttpRetryEvent
Syntax (vb)
Public Enum HttpRetryEvent
Remarks
ExampleMetadata: infused
Examples
VirtualRouter router;
VirtualNode node;
router.AddRoute("route-http2-retry", new RouteBaseProps {
RouteSpec = RouteSpec.Http2(new HttpRouteSpecOptions {
WeightedTargets = new [] { new WeightedTarget { VirtualNode = node } },
RetryPolicy = new HttpRetryPolicy {
// Retry if the connection failed
TcpRetryEvents = new [] { TcpRetryEvent.CONNECTION_ERROR },
// Retry if HTTP responds with a gateway error (502, 503, 504)
HttpRetryEvents = new [] { HttpRetryEvent.GATEWAY_ERROR },
// Retry five times
RetryAttempts = 5,
// Use a 1 second timeout per retry
RetryTimeout = Duration.Seconds(1)
}
})
});
Synopsis
Fields
| CLIENT_ERROR | HTTP status code 409. |
| GATEWAY_ERROR | HTTP status codes 502, 503, and 504. |
| SERVER_ERROR | HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511. |
| STREAM_ERROR | Retry on refused stream. |
Fields
| Name | Description |
|---|---|
| CLIENT_ERROR | HTTP status code 409. |
| GATEWAY_ERROR | HTTP status codes 502, 503, and 504. |
| SERVER_ERROR | HTTP status codes 500, 501, 502, 503, 504, 505, 506, 507, 508, 510, and 511. |
| STREAM_ERROR | Retry on refused stream. |