Stage 02 · Test · Researched comparison
Best Java Resilience Libraries in 2026
Resilience4j is the first pick for most teams building on Spring Boot or plain Java. It covers circuit breakers, retries, rate limiters, bulkheads and time limiters as small composable modules. Failsafe suits developers who want a fluent API with no framework dependency. Both are free and open source.
By Shihab Mia
Published 27 Nov 2026 · 5 tools compared
We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.
Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.
Key takeaways
- Resilience4j, Failsafe, Bucket4j, Sentinel and SmallRye Fault Tolerance are all free and open source.
- Resilience4j and Failsafe are plain Java libraries with no required framework, so they work in any JVM project.
- SmallRye Fault Tolerance targets MicroProfile and Quarkus runtimes.
- Bucket4j focuses on rate limiting, and Sentinel adds flow control plus a dashboard for rule management.
Who each pick is for
- Spring Boot and plain Java projects needing several fault-tolerance patternsResilience4j
- Developers who want a fluent API without a framework dependencyFailsafe
- Services that need precise rate limiting and throttlingBucket4j
- Teams that want flow control with a rule-management dashboardAlibaba Sentinel
- MicroProfile and Quarkus applications using fault-tolerance annotationsSmallRye Fault Tolerance
Comparison
| Tool | Best for | Standout feature | Listed starting price | Free plan or trial |
|---|---|---|---|---|
| 1Resilience4j | Spring Boot and plain Java projects needing several fault-tolerance patterns | Modular decorators for circuit breaker, retry, rate limiter, bulkhead and time limiter | Free (open source) | Free plan |
| 2Failsafe | Developers who want a fluent API without a framework dependency | Fluent, readable API for retries, circuit breakers, timeouts and fallbacks | Free (open source) | Free plan |
| 3Bucket4j | Services that need precise rate limiting and throttling | Token-bucket rate limiting with many storage backends | Free (open source) | Free plan |
| 4Alibaba Sentinel | Teams that want flow control with a rule-management dashboard | Flow control, circuit breaking and system protection rules | Free (open source) | Free plan |
| 5SmallRye Fault Tolerance | MicroProfile and Quarkus applications using fault-tolerance annotations | Implements the MicroProfile Fault Tolerance specification | Free (open source) | Free plan |
How we picked
We compared libraries on fit for common Java fault-tolerance jobs (retries, circuit breakers, rate limiting, bulkheads, timeouts), supported platforms and frameworks, licence and price, and the main limits of each. All five entries are actively maintained open-source projects. Sources are vendor documentation, project repositories and public pricing pages. Prices and licences can change, so confirm details on the project site before you commit.
The tools, one by one
Resilience4j
Best for spring Boot and plain Java projects needing several fault-tolerance patterns

What it is and where it fits
Resilience4j is a fault-tolerance library built around small, composable decorators. You wrap a supplier, function or completion stage with a circuit breaker, retry, rate limiter, bulkhead or time limiter, then combine them in a chain. It targets Java 8 and later and works with plain Java, Spring Boot, and other JVM frameworks through its core modules. The project is Apache 2.0 licensed.
The library provides metrics through Micrometer, so circuit breaker state and call outcomes can be exported to common monitoring systems. Configuration can come from code, properties or YAML. The main cost is tuning: each pattern has many parameters, and defaults may not fit your traffic. Teams that want a ready-made admin console should look at Sentinel instead.
Standout: Modular decorators for circuit breaker, retry, rate limiter, bulkhead and time limiter
Free (open source), as listed by the vendor (Resilience4j website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Modular decorators for circuit breaker, retry, rate limiter, bulkhead and time limiter
- Spring Boot integration and Micrometer metrics
Drawbacks
- Configuration has many options and can take time to tune
- no built-in dashboard
Skip it if this limit matters to you: configuration has many options and can take time to tune.
Verdict. A sensible pick for spring Boot and plain Java projects needing several fault-tolerance patterns.
Alternatives in this guide: Failsafe, Bucket4j, Alibaba Sentinel
Failsafe
Best for developers who want a fluent API without a framework dependency

What it is and where it fits
Failsafe is a lightweight library for handling failures with retries, circuit breakers, timeouts, bulkheads, rate limiters and fallbacks. Its fluent API reads close to the policy you want, for example a retry policy followed by a circuit breaker. It has no required framework and runs on any Java project, including plain JVM services and Android. The project is Apache 2.0 licensed.
Failsafe supports both synchronous and asynchronous execution, including CompletableFuture and other async types. You can attach event listeners for policy state changes and collect execution metrics. It does not ship a Spring Boot starter the way Resilience4j does, so Spring teams wire it manually. Choose it when API clarity matters more than framework integration.
Standout: Fluent, readable API for retries, circuit breakers, timeouts and fallbacks
Free (open source), as listed by the vendor (Failsafe website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Fluent, readable API for retries, circuit breakers, timeouts and fallbacks
- works in any JVM project
Drawbacks
- Smaller ecosystem than Resilience4j
- fewer framework integrations
Skip it if this limit matters to you: smaller ecosystem than Resilience4j.
Verdict. A sensible pick for developers who want a fluent API without a framework dependency.
Alternatives in this guide: Resilience4j, Bucket4j, Alibaba Sentinel
Bucket4j
Best for services that need precise rate limiting and throttling

What it is and where it fits
Bucket4j is a rate-limiting library based on the token bucket algorithm. It lets you define bandwidth limits and consume tokens per request, with support for blocking and non-blocking calls. It integrates with many storage backends for distributed limits, including Redis, Hazelcast and JDBC, and offers integrations for common frameworks. The core project is Apache 2.0 licensed.
It is the right tool when rate limiting is the main problem and you do not want a broader fault-tolerance library. It does not provide retries, circuit breakers or bulkheads, so most services combine it with Resilience4j or Failsafe. Distributed rate limiting requires a shared store and adds operational work. Single-instance services can use in-memory storage.
Standout: Token-bucket rate limiting with many storage backends
Free (open source), as listed by the vendor (Bucket4j website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Token-bucket rate limiting with many storage backends
- works standalone or with frameworks
Drawbacks
- Does only rate limiting, so pair it with another library for retries
- distributed setups need a backing store
Skip it if this limit matters to you: does only rate limiting, so pair it with another library for retries.
Verdict. A sensible pick for services that need precise rate limiting and throttling.
Alternatives in this guide: Resilience4j, Failsafe, Alibaba Sentinel
Alibaba Sentinel
Best for teams that want flow control with a rule-management dashboard

What it is and where it fits
Sentinel is a flow-control and fault-tolerance library from Alibaba. It covers traffic shaping, circuit breaking, system adaptive protection and hot-spot parameter limits. Rules can be configured in code or through a separate dashboard that pushes configuration to applications. It integrates with Spring Cloud, Dubbo and other frameworks. The project is Apache 2.0 licensed.
The dashboard is the main differentiator: it gives operators a place to view metrics and change rules without redeploying. That also means more infrastructure to run and secure. For a small service that only needs retries and a circuit breaker, Resilience4j is simpler. Sentinel fits larger systems where centralized rule management matters.
Standout: Flow control, circuit breaking and system protection rules
Free (open source), as listed by the vendor (Alibaba Sentinel website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Flow control, circuit breaking and system protection rules
- separate dashboard for rule management
Drawbacks
- More moving parts than a single library
- documentation leans toward Chinese-language sources
Skip it if this limit matters to you: more moving parts than a single library.
Verdict. A sensible pick for teams that want flow control with a rule-management dashboard.
Alternatives in this guide: Resilience4j, Failsafe, Bucket4j
SmallRye Fault Tolerance
Best for microProfile and Quarkus applications using fault-tolerance annotations

What it is and where it fits
SmallRye Fault Tolerance is the implementation of the MicroProfile Fault Tolerance specification. It provides annotations for retry, timeout, circuit breaker, bulkhead and fallback, so resilience policy sits next to the method it protects. It is the default in Quarkus and works in other MicroProfile-compatible runtimes. The project is Apache 2.0 licensed.
The main benefit is portability: code written to the specification can move between compliant runtimes. Configuration can be adjusted through MicroProfile Config without code changes. Outside MicroProfile or Quarkus, the library adds little over Resilience4j or Failsafe. Teams already on those stacks should use it rather than adding a second fault-tolerance library.
Standout: Implements the MicroProfile Fault Tolerance specification
Free (open source), as listed by the vendor (SmallRye Fault Tolerance website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Implements the MicroProfile Fault Tolerance specification
- annotation-based and portable across compliant runtimes
Drawbacks
- Best fit only for MicroProfile or Quarkus stacks
- less useful outside those runtimes
Skip it if this limit matters to you: best fit only for MicroProfile or Quarkus stacks.
Verdict. A sensible pick for microProfile and Quarkus applications using fault-tolerance annotations.
Alternatives in this guide: Resilience4j, Failsafe, Bucket4j
Who should use what
Spring Boot teams that want several patterns in one place should start with Resilience4j. Developers on plain Java or non-Spring frameworks who value a clear fluent API should look at Failsafe. Use Bucket4j when rate limiting is the core problem, Sentinel when you need a dashboard for rule management, and SmallRye Fault Tolerance when you are already on MicroProfile or Quarkus.
Questions to settle before you buy
What to check before you buy
- Confirm the library supports your Java version and framework, and check the latest release date.
- Read the licence and confirm it fits your distribution model.
- Check whether the patterns you need (retry, circuit breaker, rate limiter, bulkhead, timeout) are all covered.
- Verify how configuration is loaded and whether it can change without a redeploy.
- Check metrics and monitoring integration before you rely on the library in production.
FAQ
Is Resilience4j a replacement for Hystrix?
Yes for most use cases. Hystrix is in maintenance mode, and Resilience4j covers circuit breakers, retries, rate limiters, bulkheads and time limiters. Teams migrating usually replace Hystrix annotations with Resilience4j decorators or the Spring Boot starter.
Are these Java resilience libraries free?
All five listed libraries are free and open source under the Apache 2.0 licence. You pay only for the infrastructure you run around them, such as a Redis instance for distributed rate limiting or a host for the Sentinel dashboard.
Can I use more than one library together?
Yes. A common pairing is Resilience4j for retries and circuit breakers with Bucket4j for rate limiting. Keep the combination small, because each library adds configuration and monitoring surface that your team has to maintain.
Do these libraries work outside Spring?
Resilience4j, Failsafe, Bucket4j and Sentinel work in plain Java projects. SmallRye Fault Tolerance is aimed at MicroProfile and Quarkus runtimes. Check the documentation for your framework before adding a dependency.
Do I need a dashboard to manage resilience rules?
No. Resilience4j and Failsafe configure rules in code or configuration files. Sentinel's dashboard is useful when operators need to change rules at runtime across many services, but it adds infrastructure to run and secure.
Sources we checked
Method: how we score · editorial policy.
Change log. First published 27 Nov 2026.