docs: document failure-domain sharing and half-open throttle semantics#31
Closed
costela wants to merge 1 commit into
Closed
Conversation
Two surprising-but-intentional behaviors were undocumented: - Wrap: one Circuit can wrap many functions, which then share a single failure domain (state and failure rate). A failure in one opens the circuit for all of them. Document wrapping same-dependency functions together and using separate circuits for independent dependencies. - WithHalfOpenDelay: the half-open throttle is launch-rate based, not in-flight based. Each probe resets the delay, so a new probe is admitted roughly every delay regardless of whether the previous returned; against a slow dependency this can mean multiple concurrent in-flight probes. Point users at ConcurrencyLimiter to bound concurrent probes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Documents two surprising-but-intentional behaviors.
Why
Neither was written down, and both can bite:
Wrap): oneCircuitcan wrap many functions, which then share oneopenedAtand one failure rate — a failure in one opens the circuit for all. Now documents: wrap same-dependency methods together; use separate circuits for independent dependencies.WithHalfOpenDelay): it throttles probe launch rate, not in-flight count. Against a slow dependency this can yield multiple concurrent probes. Now points atConcurrencyLimiterfor in-flight bounding.Notes
Docs-only; no code behavior change.
🤖 Generated with Claude Code