1

I have integrated the Resilience4j circuit breaker in one of the spring boot applications that have multiple pods on K8s.

There are a couple of questions that I need to know

  1. How do I track the circuit breaker status from the actuator on each pod, is there a way I can build a utility/dashboard for the same, on local I am getting the health via the below URL. http://localhost:9090/actuator/health

  2. There is an API that will disable the circuit breaker, but given the circuit breaker is activated on each pod individually.

  • How should I divert my call to a particular pod if I need to disable it on a pod via writing an API
  • If I need to disable it across all pods, what should be the strategy?

Circuit Breaker Library - https://resilience4j.readme.io/docs/getting-started-3

Akhil Dad
  • 1,804
  • 22
  • 35

1 Answers1

0

CB is not responsible for communicating actuator health information because R4J does not affect current microservice/pod health, just handles other pod problems. So if you can not reach another endpoint. The main task is to prevent you from constantly receiving the same errors from another service. For example, should you request a 404 endpoint again? An exception is generated, which you can work with to redirect it elsewhere. In a K8S environment, you have to repeat the request, and the K8S Service (if you're lucky) will route your request to a working pod replica.

If all replicas are down, then another problem exists. :) Which has nothing to do with R4J.

You can receive R4J status by metrics. Look this: https://resilience4j.readme.io/docs/micrometer

"If I need to disable it across all pods, what should be the strategy?" Example Deployment environment flag and "if" in code what avoid this block. :)

Numichi
  • 926
  • 6
  • 14