Home » Hystrix

Tag Archives: Hystrix

Spring Cloud support for Hystrix

spring-interview-questions-answers

Spring Cloud project provides comprehensive support for Netflix OSS Hystrix library. I have previously written about how to use the raw Hystrix library to wrap remote calls. Here I will be going over how Hystrix can be used with Spring Cloud Basics There is actually nothing much to it, the concepts just carry over with certain Spring boot specific enhancements. ...

Read More »

Gentle Introduction to Hystrix – Wrapup

java-interview-questions-answers

This is a follow up to two other posts – Motivation for why something like Hystrix is needed in a distributed systems and a basic intro to Hystrix. This will be a wrap of my Hystrix journey with details of various properties that can be tweaked to change the behavior of Hystrix and will touch on a few advanced concepts ...

Read More »

Gentle Introduction to Hystrix – Hello World

java-interview-questions-answers

In a previous blog post I had covered the motivation for needing a library like Netflix Hystrix. Here I will jump into some of the very basic ways to start using Hystrix and follow it up with more complex use cases. Hello World A simple Hello World example of a “Hystrix Command” is the following: import com.netflix.hystrix.HystrixCommand; import com.netflix.hystrix.HystrixCommandGroupKey; import ...

Read More »

Gentle Introduction to Hystrix

java-interview-questions-answers

In the last few days I have been exploring the Netflix Hystrix library and have come to appreciate the features provided by this excellent library. To quote from the Hystrix site: Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in ...

Read More »

Storing months of historical metrics from Hystrix in Graphite

One of the killer-features of Hystrix is a low-latency, data-intensive and beautiful dashboard:                     Even though it’s just a side-effect of what Hystrix is really doing (circuit breakers, thread pools, timeouts, etc.), it tends to be the most impressive feature. In order to make it work you have to include hystrix-metrics-event-stream ...

Read More »

Batching (collapsing) requests in Hystrix

java-interview-questions-answers

Hystrix has an advanced feature of collapsing (or batching) requests. If two or more commands run similar request at the same time, Hystrix can combine them together, run one batched request and dispatch split results back to all commands. Let’s first see how Hystrix works without collapsing. Imagine we have a service that looks up StockPriceof a given Ticker:   ...

Read More »

Defend your Application with Hystrix

java-interview-questions-answers

In previous post http://www.javacodegeeks.com/2014/07/rxjava-java8-java-ee-7-arquillian-bliss.html we talked about microservices and how to orchestrate them using Reactive Extensions using (RxJava). But what’s happen when one or many services fail because they have been halted or they throw an exception? In a distributed system like microservices architecture it is normal that a remote service may fail so communication between them should be fault tolerant ...

Read More »