Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsarenkotxt/spring-boot-feign-ribbon-hystrix-example
Spring Boot with Feign/Ribbon/Hystrix example
https://github.com/tsarenkotxt/spring-boot-feign-ribbon-hystrix-example
feign-client hystrix ribbon spring-boot
Last synced: 13 days ago
JSON representation
Spring Boot with Feign/Ribbon/Hystrix example
- Host: GitHub
- URL: https://github.com/tsarenkotxt/spring-boot-feign-ribbon-hystrix-example
- Owner: tsarenkotxt
- Created: 2019-10-21T21:56:10.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-21T21:56:16.000Z (about 5 years ago)
- Last Synced: 2024-11-05T16:23:02.780Z (2 months ago)
- Topics: feign-client, hystrix, ribbon, spring-boot
- Language: Java
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot with Feign/Ribbon/Hystrix example
Simple Spring Boot application:
* feign client
* ribbon - load balancer, retries configurations...
* hystrix - fallback### Get started
Run the Spring Boot application:
```bash
./gradlew bootRun
```
Fetch user:
```bash
curl http://localhost:8080/
```### Configurations
```yaml
user-client:
ribbon:
eureka:
# Disables eureka for simple demo
enabled: false
# List of urls for user-client
listOfServers: localhost:8080
# Max number of retries on the same server (excluding the first try)
MaxAutoRetries: 5
# Max number of next servers to retry (excluding the first server)
MaxAutoRetriesNextServer: 5
# Interval to refresh the server list from the source
ServerListRefreshInterval: 2000
# Whether all operations can be retried for this client
OkToRetryOnAllOperations: true
# Connect timeout used by Apache HttpClient
ConnectTimeout: 3000
# Read timeout used by Apache HttpClient
ReadTimeout: 3000feign:
hystrix:
# Enable hystrix for feign
enabled: truelogging:
level:
com:
# Enables debug logs for demo
netflix: DEBUG
```### Reference Documentation
* [Feign client documentation](https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-feign.html)
* [Ribbon documentation](https://cloud.spring.io/spring-cloud-netflix/multi/multi_spring-cloud-ribbon.html)
* [Hystrix documentation](https://cloud.spring.io/spring-cloud-netflix/multi/multi__circuit_breaker_hystrix_clients.html)