HTTP Retry rule

Use this rule to set up retry logic for requests made to your Proxy and Proxy endpoints.

Defines retry logic for external requests to improve the experience of external endpoint consumers. External endpoints can reject requests when resources are unavailable. This rule retries the request on behalf of the client.

Rule execution order

All other request rules run before this rule applies.

Known Issue

  • Both the HTTP Cache Response and HTTP Retry rules don't evaluate expressions. The rule always runs regardless of input in the expression fields in the rule dialog.

  • When you use the HTTP Retry rule with the Basic Auth rule, the request fails with an error message.

    Workaround: Delete the HTTP Retry rule.

Field Description
When this rule should be applied An expression that defines one or more conditions that must be true for the rule to execute.

Default value: N/A

Example: The expression request.method == "POST" causes the rule to execute only on POST requests.

Retry Condition Select one of the following retry conditions:
  • All Errors: Retries on all types of errors.
  • Connection Errors and Auth Errors (401/403/407/511): Retries on connectivity and authorization errors.
  • Connection Errors and Client Errors (4xx): Retries on connection errors on the client side.
  • Connection Errors and Server Errors (5xx): Retries on connection errors on the server side.
Default value: All Errors
Maximum Attempts Enter the number of attempts to retry as an integer.

Maximum value: 10.

Example: 3.

Default value: 3
Retry Interval (seconds) Enter the number of seconds for the time to attempt retries as an integer.

Maximum value: 0 and Maximum value: 60.

Example: 30

Default value: 3
Retry Timeout (seconds) Enter the number of seconds for the retry timeout.

Maximum value: 300 (5 minutes)

Example: 30

Default value: 30
Automatically Retry on 429 Responses Select to continue retries for the HTTP response code 429.

Default status: Deselected

Use Retry-After Header for 429 Responses Select to continue retries when the Retry-After response header is present for the HTTP response code 429.

Default status: Deselected

Description

Required.

Default value: Requests that meet the specified criteria are being retried on failure

Example: Retry mechanism