Posts

Showing posts from 2021

Custom Circuit Breaker Policy for Mule 4

Image
  1.​ Introduction   This document is to show the details installation and configuration for custom circuit breaker policy.   Circuit Breaker monitors API calls. When everything is working as expected, it is in the state “closed”. When the number of fails, like timeout, bad request, backend api failure reaches a specified threshold, Circuit Breaker will stop processing further requests. We call it the open state. As a result, API clients will receive instant information that something went wrong without waiting for the timeout to come.   ​2.​ Detailed Policy Design   This policy implements the Circuit Breaker pattern by monitoring a configurable number of exceptions or errors returned from the target endpoint. When the number of consecutive failures crosses a threshold, the circuit breaker trips, and for the duration of a timeout period all attempts to invoke the API will fail immediately. After the timeout expires the circuit breaker allo...