Skip to content

[BUG] Fixed HTTP backoff bypasses the configured failover retry strategy #7752

Closed

Description

@Aias00

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

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:

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.

Activity

  1. added
    type: bug
    priority: medium
    on Oct 17, 2026
  2. lymerin commented on Oct 17, 2026

    @lymerin
    Contributor

    /assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature: http-proxypriority: mediumtype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions