Grokking Microservices Design Patterns
Vote

0% completed

​

Circuit Breaker Pattern: An Example

A breaker is a small state machine wrapped around a remote call. It is easier to trust once you have watched it move between its states, so this lesson runs it.

The Three States

The breaker is always in exactly one of three states, and each one answers the same question differently: may this call go through?

  1. CLOSED: yes. Calls pass, and failures in a row are counted.
  2. OPEN: no. Calls are refused at once, and the service is not contacted.
  3. HALF_OPEN: one call only, as a test of whether the service has recovered.

.....

.....

.....

Like the course? Get enrolled and start learning!
S

Shlomi Fisher

· 2 years ago

The code sample doesn't show how the rate of payment processing is slowed down when the circuit breaker is in HALF_OPEN state.

Show 2 replies

Reading Progress

0%


Vote for new content