Application resiliency using netflix hystrix
-
Upload
senthilkumar-gopal -
Category
Software
-
view
822 -
download
0
Transcript of Application resiliency using netflix hystrix
![Page 1: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/1.jpg)
Hystrixwhy resiliency?
![Page 2: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/2.jpg)
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
![Page 3: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/3.jpg)
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.
![Page 4: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/4.jpg)
Why we need Resiliency?
![Page 5: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/5.jpg)
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.
![Page 6: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/6.jpg)
Not a silver bullet
More like a Gauge & Circuit breaker,
Rather than a pipeline,
Certainly NOT the Thor’s Hammer
![Page 7: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/7.jpg)
public class CommandHelloWorld extends HystrixCommand<String> {
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
![Page 8: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/8.jpg)
How to use
![Page 9: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/9.jpg)
How to use - ConfigurationsCircuit Breaker➔ circuitBreaker.enabled➔ circuitBreaker.requestVolumeThreshold➔ circuitBreaker.sleepWindowInMilliseco
nds➔ circuitBreaker.errorThresholdPercenta
ge➔ circuitBreaker.forceOpen➔ circuitBreaker.forceClosed
Metrics➔ metrics.rollingStats.timeInMilliseconds➔ metrics.rollingStats.numBuckets➔ metrics.rollingPercentile.enabled➔ metrics.rollingPercentile.timeInMillisec
onds➔ metrics.rollingPercentile.numBuckets➔ metrics.rollingPercentile.bucketSize
execution.isolation.thread.timeoutInMilliseconds
![Page 10: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/10.jpg)
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!!!
![Page 11: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/11.jpg)
What’s Next➔ Aero Hystrix
➔ Use it for your dependencies
➔ Use the dashboard
➔ Checkout Turbine
![Page 12: Application resiliency using netflix hystrix](https://reader036.fdocuments.us/reader036/viewer/2022081507/587b3bac1a28ab9c0e8b4bdd/html5/thumbnails/12.jpg)
Questions?