The circuit-breaker pattern

In the cloud scenario with distributed systems, the probability of service failure exists for several reasons, such as a lack of connection or an unavailable service. The services created in the cloud must rely on this scenario and be prepared for fault-tolerance. This way, when a fault occurs, the reason for the fault will probably be fixed and the service will work again. However, there are situations where failures are caused by totally unexpected events and, even though the service tries to work again, it cannot. The situation is even more critical when there is timeout management.

With very long waiting periods for situations in which the failure does not disappear within a reasonable period of time, computational resources remain blocked by the timeout time. Furthermore, as other requirements for the same service arrive, things get worse. Services that depend on this service (that is, waiting for the fault to end) are also inoperative, causing the problem to cascade. The solution to this problem is the implementation of the circuit-breaker pattern. A circuit-breaker pattern handles faults that take a long time to recover.

The circuit-breaker pattern prevents an operation from repeatedly attempting to run in situations where it will likely fail during execution. In addition, this pattern checks to see whether the failure has been resolved. If it has been resolved, the proxy sends the request to the operation. If the operation fails, the failure counter is immediately incremented. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.122.82