Search code examples
apache-kafkamicroserviceshystrixcircuit-breaker

Is circuit breaker pattern applicable for asynchronous requests also?


I am new to microservice architecture. I found lots of examples to implement circuit breakers in synchronous requests.

But do we need circuit breakers in asynchronous request flows also?


Solution

  • The Circuit Breaker Pattern is mostly applicable for synchronous service communication. It is meant to avoid that a service is becoming overwhelmed with requests, and that the clients start to retry the requests so that the situation gets even worse.

    In an asynchronous, event-driven architecture, services put events on a broker, and consumers reads events in its own pace - so the producer and the consumer is decoupled so it does not have the same problem as with synchronous communication between services.