Circuit breaker design pattern: Difference between revisions

Content deleted Content added
No edit summary
Line 6:
}}
'''Circuit breaker''' is a [[Design pattern (computer science)|design pattern]] used in [[software development]]. It is used to detect failures and encapsulates the logic of preventing a failure from constantly recurring, during maintenance, temporary external system failure or unexpected system difficulties. Circuit breaker pattern prevents [[Cascading failure|cascading failures]] particularly in [[Distributed computing|distributed systems]].<ref>{{Cite book |title=Machine Learning in Microservices Productionizing Microservices Architecture for Machine Learning Solutions |publisher=Packt Publishing |year=2023 |isbn=9781804612149}}</ref>
 
According to Marc Brooker, circuit breakers can misinterpret a partial failure as total system failure and inadvertently bring down the entire system. In particular, sharded systems and cell-based architectures are vulnerable to this issue. A workaround is that the server indicates to the client which specific part is overloaded and the client uses a corresponding mini circuit breaker. However, this workaround can be complex and expensive. <ref>{{Cite book |title=Understanding Distirbuted Systems |isbn=9781838430214}}</ref>
 
Circuit breaker pattern should be used along with other patterns such as retry, fallback and timeout pattern. This helps the system to be more [[Software fault tolerance|fault tolerant]].<ref>{{Cite book |title=Kubernetes Native Microservices with Quarkus and MicroProfile |publisher=Manning |year=2022 |isbn=9781638357155}}</ref>
 
 
==Common uses==