Skip to content

Reduce default circuit break duration to 2 minutes #6015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Jun 20, 2025

Explanation

Currently, the "circuit break duration" — the duration for which requests to an RPC endpoint are paused when the endpoint is perceived to be unavailable — is 30 minutes. This is a good value when a true outage exists, but if the endpoint is merely degraded or is returning 500s for specific requests then we don't want to lock users out of their wallet for a long time. To accommodate these cases, this commit reduces the circuit break duration to 2 minutes so that recovery is faster.

References

Closes #5887.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@mcmire mcmire force-pushed the downgrade-circuit-break-duration branch 2 times, most recently from 5718d02 to 716218f Compare June 20, 2025 21:12
The `createServicePolicy` utility sets the default "circuit break
duration" to 30 minutes. When used to hit an API, this signifies the
amount of time requests to that API that will be paused if it
consistently responds with enough 500s. Since the `createServicePolicy`
utility is used to make network requests, however, it also signifies the
amount of time that users will be "locked out" from interacting with a
blockchain until requests respond successfully.

Pausing for 30 minutes makes sense if an RPC endpoint is truly down, but
it creates a major inconvenience if the endpoint mostly works and only
certain kinds of requests fail. To address this, this commit reduces the
default circuit break duration to 2 minutes to allow for faster
recovery.
@mcmire mcmire force-pushed the downgrade-circuit-break-duration branch from 716218f to e14ff4b Compare June 20, 2025 21:19
@mcmire mcmire marked this pull request as ready for review June 20, 2025 21:45
@mcmire mcmire requested a review from a team as a code owner June 20, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[controller-utils] Reduce default circuit break duration
2 participants