slippery
slippery

Reputation: 365

Using Hystrix to get list of services from Eureka through the circuit breakers

I exploit spring-cloud. As far as I understand, when client of Eureka gets a list of services from Eureka server, it uses the Ribbon for load balancing.

Does the client use Hystrix to get the list of services from Eureka through the circuit breakers?

Upvotes: 1

Views: 686

Answers (2)

Tristan Perry
Tristan Perry

Reputation: 627

As shankarsh15 says, Hystrix actually provides resilience (e.g. fallbacks) when errors and/or timeouts occur in API calls.

I believe it's actually ribbon-loadbalance (LoadBalancerContext.java -> getServerFromLoadBalancer()) that determines which client to call.

And this ultimately works in a similar way to doing discoveryClient.getInstances("service-name") (aka gets a list of service instances, then uses round robin to pick a service to use)

Upvotes: 0

shankarsh15
shankarsh15

Reputation: 1967

There is a Gateway Service called Netflix Zuul(You can also call it as edge Service).Client connect to gateway service which in turn queries Eureka Server to get appropriate Micro Service details.

Hystrix basically uses fault tolerance mechanism which can be used in any Micro Service. Its advantage is that, if any API goes down ,it gracefully handles the errors in the Application.

Upvotes: 2

Related Questions