-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Feature idea: multi-bulkhead #507
Comments
Umbrella or aggregating bulkhead: Not a broken idea. Policy selector: I can see mileage for this as a concept generalised outside the multi-bulkhead scenario. We built something like this already in the Polly-HttpClientFactory integration, a dynamic, execution-time Policy selector and configuration overloads also to make that play easily with
Interested in community feedback - interest in this? other possible uses for it? |
I've implemented this in jet/CallPolly#17 - I'm intending to have it prove its worth over there and/or wait for others to have similar needs that we can generalize from before implementing a real solution in this context so am closing this for now. Thanks again @reisenberger for helping me think this through! |
I'm looking to implement a refinement to Bulkhead (which would likely wrap normal Bulkheads) that facilitates governing by queueing and/or load-shed if the present set of in-flight requests in aggregate breach parallelism/max queueing thresholds.
I'm posting this here in the hope there will be either prior art, or someone with expertise in this space will tell me why it's a fundamentally broken idea.
An example might be that I define something like:
which internally maintains some form of
ConcurrentDictionary<string,BulkheadPolicy>
with the following constraints:facetSelector
, which gets to decide:a) to blindly let it through uncounted [trusting an outer Bulkhead to adequately restrict request flow]
b) OR the id of a sub-bulkhead from which the request should be allocated/queued/shed, and the weight to be allocated
factory
means inner bulkhead rules can be tuned per facetfacet
argumentConsumer code will go somewhere in here.
My current thinking is that this scheme is not sufficiently general in nature to warrant consideration as a Polly feature.the generalization of having afactory
suggests this can be used to make policies other than Bulkhead be adaptive for cases where e.g. some clients should not be and/or should be more throttled than others and would allow special case code to be expressed by passing arguments in theContext
, where they are easier to test, rather than sprinkling the special cases around the codebase.My current plan is to implement this within my wrapper lib and see how well it generalizes beyond just being used for multi-bulkheads. Subsequently, it can always be plucked into Polly if it a) it proves its worth and b) others are interested.
...but I'm happy to be told I'm wrong!
The text was updated successfully, but these errors were encountered: