Aias00 opened a new issue, #7752: URL: https://github.com/apache/shenyu/issues/7752
### Current behavior `AbstractHttpClientPlugin.execute()` selects `FixedRetryStrategy` solely from `HTTP_RETRY_BACK_OFF_SPEC`, even when `RETRY_STRATEGY=failover`. Fixed retry resubscribes to the original request Mono and never invokes alternate-upstream selection in `DefaultRetryStrategy.resend()`. There are two observed consequences for an idempotent GET with retries enabled: - A connection failure is retried against the original URI, with no standby attempt. - A 5xx failover signal (`ShenyuUpstreamStatusException`) fails the fixed strategy's transient-exception filter, so it gets no retry or failover at all. ### Locations - [AbstractHttpClientPlugin.java:94–106](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/AbstractHttpClientPlugin.java#L94) - [FixedRetryStrategy.java:58–69](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/FixedRetryStrategy.java#L58) - [DefaultRetryStrategy.java:88–151](https://github.com/apache/shenyu/blob/66d7d954ca37d651a5ad916f988a8081157a7ab4/shenyu-plugin/shenyu-plugin-httpclient/src/main/java/org/apache/shenyu/plugin/httpclient/DefaultRetryStrategy.java#L88) ### Reproduction / validation A Java probe compiled the current orchestration and retry strategy sources. It used the real upstream cache with primary/standby entries and a no-network HTTP transport stub that records each URI, fails the primary with either ConnectException or the exact 503 signal, and succeeds on the standby. One retry was configured: ```text FAILURE=connect BACKOFF=default ATTEMPTS=[primary.invalid, standby.invalid] RESULT=success FAILURE=connect BACKOFF=fixed ATTEMPTS=[primary.invalid, primary.invalid] RESULT=ReactiveException FAILURE=503 BACKOFF=default ATTEMPTS=[primary.invalid, standby.invalid] RESULT=success FAILURE=503 BACKOFF=fixed ATTEMPTS=[primary.invalid] RESULT=ShenyuUpstreamStatusException ``` The public plugin `execute()` path selected the strategies; the default failover control succeeded. No live HTTP upstream was contacted. Independent review confirmed the fixed strategy has no failover-aware resend path and corrected an earlier overbroad claim that 5xx was repeatedly retried on the same host: it actually has zero retries. ### Impact / suggested fix Selecting fixed delay silently removes configured failover, causing requests to fail despite a healthy standby. Apply backoff to failover-aware resend operations instead of replacing routing strategy selection with a same-request `retryWhen`. Define the interaction explicitly and preserve existing idempotency/body replay semantics. ### Related existing work #6734 concerned the older HTTP client not emitting any 5xx error signal. Current clients do emit that signal, but fixed strategy selection bypasses failover. #6464 concerned selecting non-default backoff at all; #6575 concerned fixed retry filtering; #6636 already tracks exponential transport-exception classification and is not re-reported. #7475/#7476 concern default failover exclusion/missing-list handling, whose passing control here does reach standby. ### Reviewed revision Apache ShenYu 2.7.2-SNAPSHOT, `master@66d7d954ca37d651a5ad916f988a8081157a7ab4`. P2 / Medium, high confidence. Unit-test and CI issue categories excluded. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
