You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/gatewayfilter-factories/retry-factory.adoc
+12-1Lines changed: 12 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,9 @@ The `Retry` `GatewayFilter` factory supports the following parameters:
12
12
Retries are performed after a backoff interval of `firstBackoff * (factor ^ n)`, where `n` is the iteration.
13
13
If `maxBackoff` is configured, the maximum backoff applied is limited to `maxBackoff`.
14
14
If `basedOnPreviousValue` is true, the backoff is calculated by using `prevBackoff * factor`.
15
+
* `jitter`: The configured random jitter for the retries.
16
+
Generating a backoff between `[backoff - backoff*randomFactor, backoff + backoff*randomFactor]`
17
+
* `timeout`: The configured timeout for the retries.
15
18
16
19
The following defaults are configured for `Retry` filter, if enabled:
17
20
@@ -20,6 +23,8 @@ The following defaults are configured for `Retry` filter, if enabled:
20
23
* `methods`: GET method
21
24
* `exceptions`: `IOException` and `TimeoutException`
22
25
* `backoff`: disabled
26
+
* `jitter`: disabled
27
+
* `timeout`: unlimited
23
28
24
29
The following listing configures a Retry `GatewayFilter`:
25
30
@@ -45,6 +50,9 @@ spring:
45
50
maxBackoff: 50ms
46
51
factor: 2
47
52
basedOnPreviousValue: false
53
+
jitter:
54
+
randomFactor: 0.5
55
+
timeout: 100ms
48
56
----
49
57
50
58
NOTE: When using the retry filter with a `forward:` prefixed URL, the target endpoint should be written carefully so that, in case of an error, it does not do anything that could result in a response being sent to the client and committed.
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactory.java
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server/src/test/java/org/springframework/cloud/gateway/filter/factory/RetryGatewayFilterFactoryIntegrationTests.java
+39Lines changed: 39 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,30 @@ public void retryWithBackoff() {
0 commit comments