# Will circuit breakers solve my problems?

DevFeed: [Will circuit breakers solve my problems?](<https://devfeed.tech/articles/will-circuit-breakers-solve-my-problems-12516.md>)

Original publisher: [Read original article](<http://brooker.co.za/blog/2022/02/16/circuit-breakers.html>)

Author: Marc Brooker

Published: 2022-02-16T00:00:00Z

Content type: opinion

Language: en

Sources: [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog.md>), [Marc Brooker's Blog](<https://devfeed.tech/sources/marc-brooker-s-blog-2.md>)

Topics: [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Network](<https://devfeed.tech/topics/network.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [monitor](<https://devfeed.tech/topics/monitor.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Azure](<https://devfeed.tech/topics/azure.md>)

Tags: [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [exception](<https://devfeed.tech/tags/exception.md>), [monitor](<https://devfeed.tech/tags/monitor.md>), [network](<https://devfeed.tech/tags/network.md>), [operations](<https://devfeed.tech/tags/operations.md>), [processes](<https://devfeed.tech/tags/processes.md>), [software](<https://devfeed.tech/tags/software.md>), [systems](<https://devfeed.tech/tags/systems.md>)

## AI overview

The article examines whether circuit breakers solve distributed-systems problems. It explains that retries can worsen overload by increasing traffic, while circuit breakers monitor recent failures and stop further calls after a threshold is reached. The author emphasizes that circuit breakers address cascading failures caused by remote calls, unresponsive services, and exhausted resources, but their usefulness depends on identifying the underlying problem.

## Source excerpt

Will circuit breakers solve my problems? Maybe, but you need to know what problem you're trying to solve first. A couple of weeks ago, I started a tiny storm on Twitter by posting this image, and claiming that retries (mostly) make things worse in real-world distributed systems. The bottom line is that retries are often triggered by overload conditions, permanent or transient, and tend to make those conditions worse by increasing traffic. Many people replied saying that I'm ignoring the obvious effective solution to this problem: circuit breakers. What is a circuit breaker? Way down in your basement, or in a closet, or wherever your local government decrees it to be, there's a box full of electrical circuit breakers. These circuit breakers have one job1: turn off during overload before something else melts, burns, or flashes. They're pretty great from a "staying alive" perspective. Reasoning by analogy, folks2 developed the concept of circuit breakers for distributed systems. They goal of circuit breakers is usually defined something like this (from the Azure docs): A circuit breaker acts as a proxy for operations that might fail. The proxy should monitor the number of recent failures that have occurred, and use this information to decide whether to allow the operation to proceed, or simply return an exception immediately. or this (from Martin Fowler): The basic idea behind the circuit breaker is very simple. You wrap a protected function call in a circuit breaker object, which monitors for failures. Once the failures reach a certain threshold, the circuit breaker trips, and all further calls to the circuit breaker return with an error, without the protected call being made at all. So far, so sensible. But why? What is the goal? Martin, again: It's common for software systems to make remote calls to software running in different processes, probably on different machines across a network. One of the big differences between in-memory calls and remote calls is that rem