Upload
josue-neis
View
43
Download
1
Embed Size (px)
Citation preview
failure • n. (pl. failures) 1 inability of a system or component to perform its required functions within specified performance requirements
Embrace failure● Faults will occur● Faults are tolerable
“We should write software that is cynical and expects bad things to happen” - Michael T. Nygard
1 an automatic device for stopping the flow of a current in an electric circuit as a safety measure
circuit-breaker • n. (pl. circuit-breakers)
class SleepCommand extends HystrixCommand<String> {
SleepCommand() { super( withGroupKey('sleep-group'). andCommandPropertiesDefaults( withCircuitBreakerSleepWindowInMilliseconds(wait). withExecutionTimeoutInMilliseconds(timeout) ) ) } ...
class SleepCommand extends HystrixCommand<String> {
SleepCommand() { super( withGroupKey('sleep-group'). andCommandPropertiesDefaults( withCircuitBreakerSleepWindowInMilliseconds(wait). withExecutionTimeoutInMilliseconds(timeout) ) ) } ...
class SleepCommand extends HystrixCommand<String> {
SleepCommand() { super( withGroupKey('sleep-group'). andCommandPropertiesDefaults( withCircuitBreakerSleepWindowInMilliseconds(wait). withExecutionTimeoutInMilliseconds(timeout) ) ) } ...
class SleepCommand extends HystrixCommand<String> {
SleepCommand() { super( withGroupKey('sleep-group'). andCommandPropertiesDefaults( withCircuitBreakerSleepWindowInMilliseconds(wait). withExecutionTimeoutInMilliseconds(timeout) ) ) } ...
class SleepCommand extends HystrixCommand<String> {
SleepCommand() { super( withGroupKey('sleep-group'). andCommandPropertiesDefaults( withCircuitBreakerSleepWindowInMilliseconds(wait). withExecutionTimeoutInMilliseconds(timeout) ) ) } ...
static final Integer timeout = 100
@Override String run() throws Exception { def time = Math.abs random.nextInt(150) Thread.sleep time "Sleeped for ${time} miliseconds" }
@Override String getFallback() { "Didn't sleep at all" }
static final Integer timeout = 100
@Override String run() throws Exception { def time = Math.abs random.nextInt(150) Thread.sleep time "Sleeped for ${time} miliseconds" }
@Override String getFallback() { "Didn't sleep at all" }
static final Integer timeout = 100
@Override String run() throws Exception { def time = Math.abs random.nextInt(150) Thread.sleep time "Sleeped for ${time} miliseconds" }
@Override String getFallback() { "Didn't sleep at all" }
static final Integer timeout = 100
@Override String run() throws Exception { def time = Math.abs random.nextInt(150) Thread.sleep time "Sleeped for ${time} miliseconds" }
@Override String getFallback() { "Didn't sleep at all" }
ReferencesRelease It, Design and Deploy Production-ready Software, Michael T. Nygardhttps://pragprog.com/book/mnee/release-it
Application Resilience Engineering at Netflix, Ben Christensenhttps://www.youtube.com/watch?v=RzlluokGi1w
Operational Excellence with Netflix Hystrix, Billy Yuenhttps://www.youtube.com/watch?v=VuCYkY7pFk8
Making Netflix more resilient, Ben Schmaushttp://techblog.netflix.com/2011/12/making-netflix-api-more-resilient.html
Hystrix, Defend Your App, Netflix Githubhttps://github.com/Netflix/Hystrix/wiki/How-it-Works