Chapter 15. Handling failure and latency
This chapter covers
- Introducing the circuit breaker pattern
- Handling failure and latency with Hystrix
- Monitoring circuit breakers
- Aggregating circuit breaker metrics
15.1. Understanding circuit breakers
The circuit breaker pattern, as made popular in Release It!, 2nd edition, by Michael Nygard (Pragmatic Bookshelf, 2018) addresses the reality that the code we write will fail. What’s important is that when it fails, it fails gracefully. This powerful pattern is even more significant in the context of microservices, where it’s important to avoid letting failures cascade across a distributed call stack.
The idea of the circuit breaker pattern is relatively simple and is quite similar to a real-world electrical ...
Get Spring in Action, Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.