Circuit breaker 

The timeout pattern we implemented in the previous section is efficient at protecting the patience of our users and, ultimately, our Angular application. However, in the case that the API is not responding because something went wrong on the server side, let's say 80% of your server is down and the remaining 20% is trying to manage the load, your clients will most likely repeatedly retry the action that timed out. Consequently, this puts even more stress on our dying backend infrastructure.

A circuit is an automatic device for stopping the flow of the current in an electric circuit as a safety measure. Circuit breakers are used to detect failures and encapsulate the logic of preventing a failure from reoccurring constantly ...

Get Angular Design Patterns 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.