Skip to content

Supports configuring a minimum number of requests for circuit breaker#13459

Merged
traefiker merged 1 commit into
traefik:masterfrom
hanxiantao:feat/circuit-breaker-min-req
Jul 6, 2026
Merged

Supports configuring a minimum number of requests for circuit breaker#13459
traefiker merged 1 commit into
traefik:masterfrom
hanxiantao:feat/circuit-breaker-min-req

Conversation

@hanxiantao

@hanxiantao hanxiantao commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds support for the RequestThreshold() circuit breaker expression by upgrading github.com/vulcand/oxy/v2 to v2.2.0.

This allows users to combine the existing circuit breaker metrics with a minimum request count condition, for example:

expression: "ResponseCodeRatio(500, 600, 0, 600) > 0.30 && RequestThreshold() >= 20"

Fixes #10963

Motivation

Traefik's circuit breaker previously could trip based on ratios even when only a small number of requests had been recorded. This change enables users to require a minimum number of requests before the circuit breaker opens, matching the behavior requested in #10963 and the RequestThreshold() support added in vulcand/oxy#256.

More

  • Added/updated tests
  • Added/updated documentation

Additional Notes

The new threshold is exposed through the existing expression option. No new Traefik configuration field is added.

@kevinpollet kevinpollet changed the title feat: circuit breaker supports configuring a minimum number of requests Supports configuring a minimum number of requests for circuit breaker Jul 6, 2026
@kevinpollet kevinpollet added this to the next milestone Jul 6, 2026

@kevinpollet kevinpollet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@rtribotte rtribotte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@traefiker
traefiker merged commit 1fbe532 into traefik:master Jul 6, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

circuit breaker supports configuring a minimum number of requests

4 participants