Circuit breakers came to deal with the above problems and are very helpful in a distributed systems where repetitive failures can bring down the whole system down. Let us consider that the circuit is closed and service-to-service calls happen successfully. If any service throws an error of a particular type continuously over a short period, then the circuit breaker will open the connections so that no service can communicate with that one unless it becomes stable. One more important thing is to remember is that not all errors will trigger the circuit breaker.
https://dzone.com/articles/libraries-for-microservices-development