3 ms·
Erlang has circuit breakers too, like this: https://github.com/jlouis/fuse https://github.com/jlouis/fuse Sadly, they are not mentioned much in books or other
by davidw 11y ago
Erlang has circuit breakers too, like this: https://github.com/jlouis/fuse https://github.com/jlouis/fuse
Sadly, they are not mentioned much in books or other documentation, despite being a potentially extremely useful piece of infrastructure for some kinds of projects.
- mononcqc 11y agoChapter 3 of Erlang in Anger (http://www.erlang-in-anger.com/ http://www.erlang-in-anger.com/) does mention them among other strategies in handling overload (3.2.2). I tried to put as much concise production experience as I could into that manual. Hopefully it proves helpful!
- thedudemabry 11y agoSince you're here, I just want to thank you for the most thorough, accessible, and pragmatic Erlang writing I've run across. Cheers!
- jlouis 11y agoAuthor of fuse here :) What we do in order to make the ideas of load regulation (see https://github.com/jlouis/safetyvalve https://github.com/jlouis/safetyvalve or https://github.com/uwiger/jobs https://github.com/uwiger/jobs ) and circuit breakers is that we "prove" them correct by extensive use of property based testing. That is, it is highly unlikely that these tools have errors under production runs because the corner-cases tested for them are far more complex than what a normal program would do. The reason it is nice to have circuit breakers is what Fred touched on in another thread here: you want to gracefully degrade a system, even if parts of it is temporarily down, either due to error or for maintenance. You can thus keep up the processes that are proxying for the underlying cascading dependency, and turn faults into terms of the form `{error, system_unavailable}` which lets you turn an implicit crash into an explicit error path.