Sitelet https://github.com/feuyeux/hello-resilience
Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hello-resilience

Microservices Resilience Patterns

name how does it work? description links
Retry repeats failed executions Many faults are transient and may self-correct after a short delay. overview, documentation, Spring
Circuit Breaker temporary blocks possible failures When a system is seriously struggling, failing fast is better than making clients wait. overview, documentation, Feign, Spring
Rate Limiter limits executions/period Limit the rate of incoming requests. overview, documentation, Feign, Spring
Time Limiter limits duration of execution Beyond a certain wait interval, a successful result is unlikely. documentation, Spring
Bulkhead limits concurrent executions Resources are isolated into pools so that if one fails, the others will continue working. overview, documentation, Spring
Cache memorizes a successful result Some proportion of requests may be similar. documentation
Fallback provides an alternative result for failures Things will still fail - plan what you will do when that happens. Try::recover, Spring, Feign
<dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-circuitbreaker</artifactId>
    <version>${resilience4jVersion}</version>
</dependency>
<dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-ratelimiter</artifactId>
    <version>${resilience4jVersion}</version>
</dependency>
<dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-retry</artifactId>
    <version>${resilience4jVersion}</version>
</dependency>
<dependency>
    <groupId>io.github.resilience4j</groupId>
    <artifactId>resilience4j-bulkhead</artifactId>
    <version>${resilience4jVersion}</version>
</dependency>

Circuit Breaker

mvn test -Dtest=HelloResilienceApplicationTests#testCircuitBreaker

Retry

mvn test -Dtest=HelloResilienceApplicationTests#testRetry

Rate limiter

mvn test -Dtest=HelloResilienceApplicationTests#testRateLimiting

Bulkhead

mvn test -Dtest=HelloResilienceApplicationTests#testBulkhead

https://github.com/resilience4j/resilience4j-spring-boot3-demo

About

Microservices Resilience Patterns

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages