Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Angular Design Patterns

You're reading from   Angular Design Patterns Implement the Gang of Four patterns in your apps with Angular

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781786461728
Length 178 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Mathieu Nayrolles Mathieu Nayrolles
Author Profile Icon Mathieu Nayrolles
Mathieu Nayrolles
Nayrolles Mathieu (USD) Nayrolles Mathieu (USD)
Author Profile Icon Nayrolles Mathieu (USD)
Nayrolles Mathieu (USD)
Arrow right icon
View More author details
Toc

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 (during maintenance, temporary external system failure, or unexpected system difficulties).

Concretely, within the framework of an Angular...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime