Merged upstreamFeatureMerged Jul 7, 2026
Add MVC retry backoff support
Added backoff configuration support to Spring Cloud Gateway MVC Retry filters, bringing retry delay controls to both MVC retry implementations.
Problem
The server-webmvc RetryConfig did not support backoff even though the reactive retry filter did. Both MVC retry paths lacked firstBackoff, maxBackoff, and factor controls, so MVC routes could not configure exponential retry delays through YAML or the Java DSL.
Approach
Introduced BackoffConfig on RetryConfig, validated invalid backoff settings, applied exponential backoff in both GatewayRetryFilterFunctions and FrameworkRetryFilterFunctions, documented YAML and Java DSL usage, and added regression coverage for runtime behavior and config binding.
Impact and scope
- Brings Spring Cloud Gateway MVC retry behavior closer to reactive Gateway retry parity.
- Gives MVC routes explicit retry delay controls instead of immediate retry loops.
- Covers both the Spring Retry path and the preferred Spring Framework retry path during the transition.
Validation
- Added MVC retry backoff tests covering both retry implementations and config binding.
- Added invalid backoff validation coverage for missing firstBackoff, too-small durations, bad factors, and invalid maxBackoff.
- PR validation included focused retry tests and a server-webmvc module verify run.