Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
A transient failure is a failure which is short term and unpredictable and corrects
itself automatically (e.g. application restarts or network connectivity fluctuations or
timeouts).It becomes worse when there is chain of dependency between
applications and one application failing due to a transient failure results into
cascading failures.
On the other hand there are certain scenarios where failures can be long term and
might take couple of hours or even days to fix .In such scenarios it is not practical
to keep calling dependent service resulting in failed requests as this would
consume unnecessary resources (memory ,threads, db connections etc.) and
bandwidth.
There are specific patterns which can deal with both of these situations.
Retry pattern
Retry pattern deals with the first situation where we don’t want our application to
fail because of transient faults.In such case a retry pattern can just retry (either
endlessly or for a particular number of times) and overcome the transient fault
o you implement a retry pattern to deal with transient failures but in case problem
is not solved on multiple retries circuit breaker comes into play and breaks the
circuit.
What’s a CompletableFuture?