Circuit breaker design pattern

This is an old revision of this page, as edited by Bearcat (talk | contribs) at 22:56, 31 July 2010 (categorization/tagging/cleanup using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


Circuit breaker is a design pattern in modern software development.

It is a component that encapsulates logic of preventing a failure to reoccur constantly (during maintenance, temporary external system failure or unexpected system difficulties).

Example: Your application connects to a database 100 times per second and the database fails. You do not want to have the same error reoccur constantly. You also want to handle the error quickly and gracefully without waiting for TCP connection timeout.

Circuit breaker is used to detect failures and prevent application from trying to perform the action that is doomed to fail (until its safe to retry).