A microservice-based architecture brings a lot of benefits to the table. However, at the same time, it adds a lot of complexity to a system and requires additional effort to make it resilient against network issues, to monitor its internal state, and to debug issues when something goes wrong. Consequently, selecting this pattern for an MVP or PoC is often considered to be a form of premature optimization that likely introduces more issues than it solves.
When the number of errors from a particular downstream service exceeds a particular threshold, the circuit breaker is tripped and all future requests automatically fail with an error. Periodically, the circuit breaker lets some requests go through and after a number of successful ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.