Search code examples
resilience4j

Resilience4j bulkhead issue


I am using Resilience4j and facing issue with bulkhead I have configured below property.

resilience4j.bulkhead: configs: default: maxConcurrentCalls: 2 maxWaitDuration: 0 instances: MyService: baseConfig: default

Its working perfectly first time but after second time we did not get expected output some time all the request succeed and some time one or two request fail. It should only pass 2 request and rest will reject.

I am using below dependency.

resilience4j-spring-boot2 1.5.0

Please help me out.


Solution

  • How you are making parallel calls. Probably your requests are finishing too fast. To replicate the scenario. Lets have block in your api that takes computation time of 1 sec. Try to trigger the calls using JMeter or Apache Bench mark.