![](https://static.packt-cdn.com/products/9781787121140/graphics/assets/851a4c9e-9e30-4022-884b-630983d59129.png)
Circuit Breaker
![](https://static.packt-cdn.com/products/9781787121140/graphics/assets/851a4c9e-9e30-4022-884b-630983d59129.png)
Problem
In a Microservice based system, individual services may fail at any point of time. If a client calls a service frequently, then each call would need to wait for a timeout before failing the operation. Making frequent calls to a failing service and waiting for response wastes system resources and slows down the whole application:
![](https://static.packt-cdn.com/products/9781787121140/graphics/assets/c5b5eac3-f5cc-487a-bd97-598a8eae16ff.png)
Circuit Breaker(Problem)
Solution
The circuit breaker pattern prevents calls to be made to a failing resource once the number of failures cross a particular threshold. To implement the circuit breaker pattern, wrap calls...