Slide 1

Slide 1 text

Hystrix why resiliency?

Slide 2

Slide 2 text

Agenda ❏ What is Resiliency? ❏ Why we need Resiliency? ❏ What is Hystrix ❏ Not a silver bullet ❏ How to use ❏ What you get and don’t ❏ What’s next

Slide 3

Slide 3 text

What is Resiliency? Resiliency is the ability to provide and maintain an acceptable level of service in the face of faults and challenges to normal operation.” Threats and challenges for services can range from simple misconfiguration over large scale natural disasters to targeted attacks.

Slide 4

Slide 4 text

Why we need Resiliency?

Slide 5

Slide 5 text

What is Hystrix? 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 complex distributed systems where failure is inevitable.

Slide 6

Slide 6 text

Not a silver bullet More like a Gauge & Circuit breaker, Rather than a pipeline, Certainly NOT the Thor’s Hammer

Slide 7

Slide 7 text

public class CommandHelloWorld extends HystrixCommand { private final String name; public CommandHelloWorld(String name) { super(HystrixCommandGroupKey.Factory.asKey("ExampleGroup")); this.name = name; } @Override protected String run() { // a real example would do work like a network call here return "Hello " + name + "!"; } } CommandHelloWorld.execute(); How to use

Slide 8

Slide 8 text

How to use

Slide 9

Slide 9 text

How to use - Configurations Circuit Breaker ➔ circuitBreaker.enabled ➔ circuitBreaker.requestVolumeThreshold ➔ circuitBreaker.sleepWindowInMilliseconds ➔ circuitBreaker.errorThresholdPercentage ➔ circuitBreaker.forceOpen ➔ circuitBreaker.forceClosed Metrics ➔ metrics.rollingStats.timeInMilliseconds ➔ metrics.rollingStats.numBuckets ➔ metrics.rollingPercentile.enabled ➔ metrics.rollingPercentile.timeInMillisecond s ➔ metrics.rollingPercentile.numBuckets ➔ metrics.rollingPercentile.bucketSize execution.isolation.thread.timeoutInMilliseconds

Slide 10

Slide 10 text

What you get and don’t ➔ Real-time Dashboard ➔ Circuit Breaker ➔ Auto Mark Up / Mark Down ➔ Highly Configurable ➔ Reduced Latencies ➔ Faster responses ➔ 100% availability ➔ Magic!!!

Slide 11

Slide 11 text

What’s Next ➔ Aero Hystrix ➔ Use it for your dependencies ➔ Use the dashboard ➔ Checkout Turbine

Slide 12

Slide 12 text

Questions?