Skip to content

leonardo-anjos/flowchart-circuit-breaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flowchart-circuit-breaker

This is a CircuitBreaker class that has the following methods:

  1. Fire: To make requests
  2. Success: Triggered on success
  3. Fail: Triggered on a failure

The core idea is simple, let’s understand it with the help of a flowchart:

Alt text

We start with a Closed state, meaning requests are going through. If the number of failures is more than a failureThreshold, the circuit shifts into the Open state, meaning no more requests can go through.

ref.: https://blog.logrocket.com/use-circuit-breaker-node-js/

About

a real exemple of use circuit breaker in node.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published