I am running performance tests and testing some values on the sleepWindowInMilliseconds. What I have noticed is that it doesn't sleep for the time set for the property sleepWindowInMilliseconds.
I set it to 500000ms(5 minutes) but looking at the dashboard the circuit closes much faster. Some times after just a qouple of seconds.
I have attached some data from the hystrix stream of a hystrix command when the circuit is open and right after a command stating it is closed but the time it was open was just a couple of seconds. What I notice is that all errorPercentage data is cleared. Why is that? Is somehow the sleepwindow setting overridden by some other parameters? I guess that has something to do with it?
Thread:
data: {"type":"HystrixThreadPool","name":"main.thread","currentTime":1448444261526,"currentActiveCount":10,"currentCompletedTaskCount":246,"currentCorePoolSize":10,"currentLargestPoolSize":10,"currentMaximumPoolSize":10,"currentPoolSize":10,"currentQueueSize":0,"currentTaskCount":256,"rollingCountThreadsExecuted":0,"rollingMaxActiveThreads":0,"rollingCountCommandRejections":0,"propertyValue_queueSizeRejectionThreshold":5,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"reportingHosts":1}
HystrixCommand:
data: {"type":"HystrixCommand","name":"main.thread","group":"main.thread","currentTime":1448444262026,"isCircuitBreakerOpen":true,"errorPercentage":100,"errorCount":48,"requestCount":48,"rollingCountBadRequests":0,"rollingCountCollapsedRequests":0,"rollingCountEmit":0,"rollingCountExceptionsThrown":48,"rollingCountFailure":0,"rollingCountEmit":0,"rollingCountFallbackFailure":0,"rollingCountFallbackRejection":0,"rollingCountFallbackSuccess":0,"rollingCountResponsesFromCache":0,"rollingCountSemaphoreRejected":0,"rollingCountShortCircuited":48,"rollingCountSuccess":0,"rollingCountThreadPoolRejected":0,"rollingCountTimeout":0,"currentConcurrentExecutionCount":10,"rollingMaxConcurrentExecutionCount":11,"latencyExecute_mean":20962,"latencyExecute":{"0":20864,"25":20917,"50":20952,"75":20989,"90":21114,"95":21148,"99":21165,"99.5":21165,"100":21165},"latencyTotal_mean":20962,"latencyTotal":{"0":20864,"25":20917,"50":20952,"75":20989,"90":21114,"95":21148,"99":21165,"99.5":21165,"100":21165},"propertyValue_circuitBreakerRequestVolumeThreshold":20,"propertyValue_circuitBreakerSleepWindowInMilliseconds":300000,"propertyValue_circuitBreakerErrorThresholdPercentage":50,"propertyValue_circuitBreakerForceOpen":false,"propertyValue_circuitBreakerForceClosed":false,"propertyValue_circuitBreakerEnabled":true,"propertyValue_executionIsolationStrategy":"THREAD","propertyValue_executionIsolationThreadTimeoutInMilliseconds":45000,"propertyValue_executionTimeoutInMilliseconds":45000,"propertyValue_executionIsolationThreadInterruptOnTimeout":true,"propertyValue_executionIsolationThreadPoolKeyOverride":null,"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"propertyValue_requestCacheEnabled":true,"propertyValue_requestLogEnabled":true,"reportingHosts":1,"threadPool":"main.thread"}
CB closed
Thread:
data: {"type":"HystrixThreadPool","name":"main.thread","currentTime":1448444262026,"currentActiveCount":10,"currentCompletedTaskCount":246,"currentCorePoolSize":10,"currentLargestPoolSize":10,"currentMaximumPoolSize":10,"currentPoolSize":10,"currentQueueSize":0,"currentTaskCount":256,"rollingCountThreadsExecuted":0,"rollingMaxActiveThreads":0,"rollingCountCommandRejections":0,"propertyValue_queueSizeRejectionThreshold":5,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"reportingHosts":1}
HystrixCommand:
data: {"type":"HystrixCommand","name":"main.thread","group":"main.thread","currentTime":1448444262526,"isCircuitBreakerOpen":false,"errorPercentage":0,"errorCount":0,"requestCount":0,"rollingCountBadRequests":0,"rollingCountCollapsedRequests":0,"rollingCountEmit":0,"rollingCountExceptionsThrown":2,"rollingCountFailure":0,"rollingCountEmit":0,"rollingCountFallbackFailure":0,"rollingCountFallbackRejection":0,"rollingCountFallbackSuccess":0,"rollingCountResponsesFromCache":0,"rollingCountSemaphoreRejected":0,"rollingCountShortCircuited":0,"rollingCountSuccess":0,"rollingCountThreadPoolRejected":2,"rollingCountTimeout":0,"currentConcurrentExecutionCount":10,"rollingMaxConcurrentExecutionCount":11,"latencyExecute_mean":20962,"latencyExecute":{"0":20864,"25":20917,"50":20952,"75":20989,"90":21114,"95":21148,"99":21165,"99.5":21165,"100":21165},"latencyTotal_mean":20962,"latencyTotal":{"0":20864,"25":20917,"50":20952,"75":20989,"90":21114,"95":21148,"99":21165,"99.5":21165,"100":21165},"propertyValue_circuitBreakerRequestVolumeThreshold":20,"propertyValue_circuitBreakerSleepWindowInMilliseconds":300000,"propertyValue_circuitBreakerErrorThresholdPercentage":50,"propertyValue_circuitBreakerForceOpen":false,"propertyValue_circuitBreakerForceClosed":false,"propertyValue_circuitBreakerEnabled":true,"propertyValue_executionIsolationStrategy":"THREAD","propertyValue_executionIsolationThreadTimeoutInMilliseconds":45000,"propertyValue_executionTimeoutInMilliseconds":45000,"propertyValue_executionIsolationThreadInterruptOnTimeout":true,"propertyValue_executionIsolationThreadPoolKeyOverride":null,"propertyValue_executionIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_fallbackIsolationSemaphoreMaxConcurrentRequests":10,"propertyValue_metricsRollingStatisticalWindowInMilliseconds":10000,"propertyValue_requestCacheEnabled":true,"propertyValue_requestLogEnabled":true,"reportingHosts":1,"threadPool":"main.thread"}