Questions tagged [bulkhead]

15 questions
5
votes
1 answer

What is the best order to apply multiple Polly policies?

The order in which Polly policies are encapsulated change the final result. Which is the best order if I want to use the following policies? This is the best order I could think of: the retries should be submitted to the bulkhead limits, and the…
4
votes
1 answer

HttpClient TimeOut and Polly Bulkhead Policy problem

I'm having many timeouts exceptions using Polly Bulkhead policy, this policy helps me to limit the number of concurrent calls that I'm sending to a specific hosts. However It seems that the HttpClient Timeout time affects the whole delegates. I'm…
ganchito55
  • 3,559
  • 4
  • 25
  • 46
3
votes
1 answer

WaitAndRetryPolicy combined with BulkheadPolicy, prioritizing retries. Is it possible?

I am evaluating the Polly library in terms of features and flexibility, and as part of the evaluation process I am trying to combine the WaitAndRetryPolicy with the BulkheadPolicy policies, to achieve a combination of resiliency and throttling. The…
Theodor Zoulias
  • 34,835
  • 7
  • 69
  • 104
3
votes
1 answer

Polly: BulkheadPolicy combined with RetryPolicy

I've got a C# API that communications with a web service that throws exceptions if it's too busy. I want to limit the number of parallel calls to this WCF service. As the web service quickly throws exceptions when it's too busy, I want to use a…
Boland
  • 1,531
  • 1
  • 14
  • 42
3
votes
1 answer

Clarification on running multiple async tasks in parallel with throttling

EDIT: Since the Bulkhead policy needs to be wrapped with a WaitAndRetry policy, anyway...I'm leaning towards example 3 as the best solution to keep parallelism, throttling, and polly policy retrying. Just seems strange since I thought the…
2
votes
1 answer

How to execute a Polly policy for all elements of an IEnumerable, and stop on first unhandled exception

The policies of the Polly library, for example Bulkhead, Retry etc, contain a method ExecuteAsync with many overloads (18), but none of them allows to execute the policy for all elements of an IEnumerable and gather the results. It seems that the…
Theodor Zoulias
  • 34,835
  • 7
  • 69
  • 104
1
vote
1 answer

Access to wrapped Polly policy

If I wrap some polices is it possible to acces them from the wrapped policy? example: var handle = Policy.Handle();//.OrResult(r => r.IsSuccessStatusCode == false); var timeout = Policy.TimeoutAsync(() =>…
Martin Andersen
  • 2,460
  • 2
  • 38
  • 66
0
votes
0 answers

Why @Bulkhead method not working when I call it from the same class

I have a @Bulkhead method like this @GetMapping("/bulkhead") @Bulkhead(name = USER_SERVICE, fallbackMethod = "bulkheadDefault") public ResponseEntity testBulkhead(){ logger.info("call " + Thread.currentThread().getName()); String…
myfidan
  • 11
  • 3
0
votes
0 answers

How to propogate the ThreadContext or MDC traceId and spanId to the fallback thread pool in reselience4j

Using the below property, I was able to propogate the ThreadContext to bulkhead pool. resilience4j.thread-pool-bulkhead.instances.service.context-propagators[0]=com.config.MDCContextPropogater But it seems that the fallback is executing on a…
tusharRawat
  • 719
  • 10
  • 24
0
votes
0 answers

Change maxConcurrentCalls setting for existing Resilience4j Bulkhead

Is it possible to change the maxConcurrentCalls setting for an already instantiated Resilience4j bulkhead? I'd rather not create a new bulkhead with a new setting because then there would be a period where two bulkheads would be used and the number…
Thor
  • 600
  • 1
  • 6
  • 17
0
votes
1 answer

Determine concurrency count for Resilience4j bulkhead

I'd like to track the concurrency levels of my bulkhead in an application for monitoring purposes. Is the concurrency count for a Resiliency4j bulkhead externally available? I can keep tack of it myself with the onCallPermitted and onCallFinished…
Thor
  • 600
  • 1
  • 6
  • 17
0
votes
0 answers

Does semian gem in ruby opens the circuit only within one pod in kubernetes?

We deploy our code on kubernetes and have integrated the circuit breaker for redis in our ruby on rails using semian gem. In the document, it says that the circuit breaker feature is not coordinated server wide. Does it mean that if the circuit…
Savvy
  • 21
  • 1
  • 8
0
votes
0 answers

Add Bulkhead filter on Spring Cloud Gateway routes

I need to add resilience4j BulkHead filter on Spring Cloud Gateway routes just like we add circuitBreaker filter like below cloud: gateway: routes: - id: test-service uri: http://localhost:8080 predicates: …
0
votes
1 answer

How to make fallback for circuit breaker invoked on all retries on the broken circuit

I have the following policies: var sharedBulkhead = Policy .BulkheadAsync( maxParallelization: maxParallelizations, maxQueuingActions: maxQueuingActions, onBulkheadRejectedAsync: (context) => …
Nimish David Mathew
  • 2,958
  • 6
  • 29
  • 45
0
votes
1 answer

Does Polly Bulkhead policy itself place calls onto threads?

I have the following Polly policies defined: sharedBulkhead = Policy.Bulkhead(maxParallelizations, maxQueuingActions); resilienceStrategy = Policy.Wrap(retryPolicy, circuitBreaker, sharedBulkhead); policyWrap =…
Clairvoyant
  • 81
  • 1
  • 9