In any application, different sets of services/third-party APIs communicate either asynchronously (out of score from current context) or synchronously or sometimes both (rare cases).

In a Synchronous paradigm, a service (i.e. a caller) calls to another service (i.e. a supplier) and waits until a response is available. And here lies an issue because it’s very likely that the supplier is either in an unusable or unresponsive state due to high latency or it’s offline. Due to which resources like threads will get exhausted. The caller will not be able to handle further incoming requests and starts failing too.

This leads to a cascading effect on other parts of the systems and finally, it ended up with an application break down.

What’s the solution for building a resilient system?

The solution to this problem is the Circuit Breaker Pattern.

#javascript #circuit-breaker #software-architecture #software-development #design-patterns #programming #technology #startups

Introduction to Circuit Breaker Pattern: How to Build Better Software
1.15 GEEK