Spring Boot Resilience Cheat Sheet
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
The Resilience section comes with two single-page, colour-coded summaries, one per library:
-
Spring Boot Resilience (Resilience4j) Cheat Sheet, written against Resilience4j 2.4.x, Spring Boot 4.1.x, Spring Framework 7.0.x and Java 21 (verified on 4 October 2026): the failure modes and which pattern answers which, the Boot 4 and Boot 3 dependencies, the CircuitBreaker state machine with its key properties and defaults, one row each for Retry, RateLimiter, Bulkhead and TimeLimiter, the
application.ymlskeleton and the customizers, the annotations with the fallback-signature rule and the default aspect order, the Actuator endpoints, health statuses and key meter names, Spring Cloud CircuitBreaker, Gateway and OpenFeign one-liners, Spring Framework 7@Retryableand@ConcurrencyLimitagainst Resilience4j, testing tips, the anti-patterns list, and a Resilience4j versus Bucket4j mini-table. -
Spring Boot Bucket4j Cheat Sheet, written against Bucket4j 8.21.x, Spring Boot 4.1.x, Spring Framework 7.0.x and Java 21, with the community
bucket4j-spring-boot-starter0.20.0-RC1 (0.14.0 for Spring Boot 4.0) and Spring Cloud Gateway 5.0.3 (verified on 5 October 2026): when to use Bucket4j or Resilience4j, the dependencies, the token-bucket formula and the refill styles, the Bucket API one-liners,TokensInheritanceStrategy, theProxyManagerskeleton with the backend table, client-side settings, expiration and optimizations, a manual Spring Boot filter with 429,Retry-Afterand a ProblemDetail, the starter YAML and@RateLimiting, the Gateway Web MVC and WebFlux limiters, metrics, testing tips, and the anti-patterns and checklist.
Print them, or keep them open beside the code. For the full explanation, every option and additional examples, see the dedicated pages:
Overview — Resilience.
Foundations — Resilience Fundamentals, Getting Started, and Registries, Configuration & Decorators.
Core modules — CircuitBreaker, Retry, RateLimiter, Bulkhead, TimeLimiter, Fallbacks & Composition, and Cache & Hedge.
Spring Boot integration — Spring Boot Configuration, Annotations & Aspect Order, Programmatic Usage, Reactive, Kotlin & RxJava, Observability, Spring Cloud CircuitBreaker, Gateway & OpenFeign, and Spring Framework Native Resilience.
Quality and operations — Testing Resilience, Production Tuning & Anti-patterns, and Migration & What’s Changed.
Bucket4j positioning — Resilience4j versus Bucket4j.
Bucket4j core — Bucket4j: Overview and Getting Started, Bucket4j: Token Bucket and Bandwidths, and Bucket4j: The Bucket API.
Bucket4j distributed — Bucket4j: Distributed Rate Limiting and Bucket4j: Backends.
Bucket4j and Spring Boot — Bucket4j: Spring Boot Manual Integration, Bucket4j: The Spring Boot Starter, and Bucket4j: Spring Cloud Gateway.
Bucket4j operations — Bucket4j: Observability, Bucket4j: Testing Rate Limits, Bucket4j: Production Checklist, and Bucket4j: Migration & What’s Changed.
References
The PDFs summarize the official documentation; each source is cited in full on the page listed above that covers it, and in the section bibliography.
-
Resilience4j source repository and README and the v2.4.0 release
-
Bucket4j source repository and README and the 8.21.0 release
-
bucket4j-spring-boot-starter (community project) and its complete properties
-
Spring Cloud Gateway: Web MVC rate limiter (Bucket4j) and WebFlux
RequestRateLimiter -
RFC 6585: 429 Too Many Requests, RFC 9110:
Retry-Afterand RFC 9457: Problem Details for HTTP APIs