SYSTEM Cited by 1 source
Resilience4j¶
What it is¶
Resilience4j is an open-source JVM resilience library that provides composable, functional-style implementations of the standard resilience primitives:
- CircuitBreaker — state-machine wrapping of a failure- prone call (patterns/circuit-breaker).
- Retry — configurable retry with exponential backoff and jitter.
- TimeLimiter — wraps a
CompletionStagewith a deadline, canonical implementation of patterns/time-limiter-wrapping-chained-calls. - Bulkhead — bounds concurrent calls to a dependency.
- RateLimiter — token-bucket style rate limiting.
- Cache — memoises successful results.
It is the canonical successor to Netflix Hystrix (archived 2018), designed for Java 8+ with lambda-style composition and without Hystrix's heavyweight thread-pool model.
Why it shows up in resilience guidance¶
Resilience4j is the library Zalando's timeouts post cites as the implementation target for its chained-call time-limiter guidance:
"There is also a nice TimeLimiter module provided by the Resilience4j library." (Source: sources/2023-07-25-zalando-all-you-need-to-know-about-timeouts)
Its primitives compose, so a client can stack
TimeLimiter.compose(CircuitBreaker.compose(Retry.compose(
...))) on the same CompletionStage-returning call —
matching the Zalando house-style rule that retries must be
paired with circuit breakers, and chained calls must be
time-limited.
Seen in¶
- sources/2023-07-25-zalando-all-you-need-to-know-about-timeouts
— cited as the canonical JVM implementation of the
TimeLimiterpattern for chained calls.
Related¶
- patterns/circuit-breaker — the pattern its
CircuitBreakermodule implements. - patterns/time-limiter-wrapping-chained-calls — the
pattern its
TimeLimitermodule implements. - patterns/retry-on-5xx-not-4xx — complements its
Retrymodule. - concepts/exponential-backoff-jitter — the strategy the
Retrymodule implements. - systems/java-completablefuture — the
CompletionStageprimitive Resilience4j composes around.