Skip to content

A springboot application that demonstrates the working of Hystrix- The fault tolerance library.

Notifications You must be signed in to change notification settings

pkoli/hystrix-springboot-circuitbreaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

hystrix-springboot-circuitbreaker

A springboot application that demonstrates the working of Hystrix- The fault tolerance library.

Hystrix is used in scenarios where you need to have a fallback mechanism when calls to a service are failing and they have reached a predefined threshold. What it does is it opens the circuit, that is it routes the subsequent calls to the fallback method until the service is up and running.

In our application we're making a get call to an api that returns some random json. To test the failure scenario disconnect from the internet and make the get call, you would receive an output as Fallback as the fallback method gets called.

CURL GET Request

curl -X GET https://localhost:8080/request

Note-

The first call fails as the call gets timed out due to the infrastructure initialization that takes place on the first call. More on that here - https://stackoverflow.com/questions/36071841/spring-cloud-hystrix-fails-at-first-command-call

About

A springboot application that demonstrates the working of Hystrix- The fault tolerance library.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages