
Circuit Breakers in Elixir - untothebreach
http://blog.rokkincat.com/circuit-breakers-in-elixir/
======
brianwawok
So what is the benefit of the iTunes fuse example over a very simple

Try iTunes

Catch exception

Try local search

I guess in a bad state it makes your results faster. How often does that need
to happen to justify the complexity?

~~~
scwoodal
My thought was the complexity would be worth it if you have a non-trivial
number of users.

Additionally some third party API's have rules where they expect you to back
off exponentially if there are errors. You'll get your account suspended if
you don't play by the rules.

~~~
brianwawok
I think the key is you need a backup for the system you are gating off. If
your db breaks you blow a fuse and show errors... Not sure you gained much.

~~~
jlouis
There is a subtle but important difference:

In a timeout situation, you know relatively little.

If the circuit tells you it is broken, you know that the backend system is
deemed down and trying again right now is probably futile.

Each client for a server (on which the fuse runs) will be rather blind to the
experiences of _other_ clients. But the server, and thus the fuse, will know
what happens to all the clients. This allows you to act globally on the server
side. But this in turn empowers each client locally since it now also has
global information.

~~~
brianwawok
So making a fuse global, say throwing it in your db, now means you can't have
a fuse about the DB. Which may be okay, but seems in some ways less good than
a local fuse.

