Industrial Internet Application Development
by Alena Traukina, Jayant Thomas, Prashant Tyagi, Veera Kishore Reddipalli
Example
We are going to use a very simple use case to illustrate the circuit breaker. In this use case, we are going to invoke an external service and use a very simple fallback for demonstration purposes. Imagine if the external service fails due to the network, or perhaps the system is very busy and cannot handle the load, and the client could be forced to wait for up to 60 seconds before an exception occurs. By sending more and more requests to an already exhausted service, resources such as memory, connections, and threads could be exhausted, preventing other clients from getting serviced, and this will bring down the overall SLA of the system.
Implementing the circuit breaker in the client could help to solve this problem and handle ...
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.
Read now
Unlock full access