O'Reilly logo

Cloud Foundry for Developers by David Wu, Rahul Jain, Rick Farmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Circuit breakers and dashboard

To limit the duration of operations, we can use timeouts. Timeouts can prevent hanging operations and keep the system responsive. However, using static, fine-tuned timeouts in microservices communication is an anti-pattern; we are in a highly dynamic environment where it's almost impossible to come up with the right timing limitations that work well in every case.

Circuit breakers insulate a service from its dependencies by preventing remote calls when a dependency is determined to be unhealthy, just as electrical circuit breakers protect homes from burning down due to excessive use of power. Circuit breakers are implemented as state machines:

Figure 35: Circuit breaker workflow

In the closed state, all calls ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required