Java Magazine, Sept/Oct 2018
ORACLE COM JAVAMAGAZINE SEPTEMBER OCTOBER 2018 48 the leading edge requests to go to the target system In the open state which is usually reached after failure thresholds are breached Hystrix will not call the underlying system and Hystrix will return the value provided by the getFallback method By default the circuit is tripped after 20 failed requests or if more than 50 of the requests failed within a rolling time period which defaults to 10 seconds Table 2 shows the results of the same set of ab tests run on the Hystrix implementation When the price microservice is fast that is configured to process requests within 100 milliseconds on average the results are very similar to the non Hystrix implementation It does take a little longer for Hystrix to process the requests but that extra time is not significant for my purposes here When the price service is configured to take an average of a full second to process requests Hystrix will time out the requests that take longer than 1200 milliseconds and in such cases it will use the fallback solution If a circuit breaker is tripped requests will not be sent to the price Table 2 Test results using Hystrix test 1 test 2 test 3 test 4 NUMBER OF REQUESTS 500 500 500 500 PRICE SERVICE MEAN PROCESSING TIME MS 100 1000 1000 1000 OUT OF SERVICE RATE 0 0 15 SERVICE IS DOWN PRICE SERVICE STANDARD DEVIATION PROCESSING TIME MS 20 200 200 200 MAXIMUM ALLOWED TIME FOR REQUEST MS 1200 1200 1200 1200 TIME TAKEN FOR TESTS SECONDS 5401 49559 49869 4723 NUMBER OF FAILED REQUESTS 0 0 85 0 REQUESTS PER SECOND 9258 987 103 10587 HOLDINGS SERVICE RESPONSE TIME 50TH PERCENTILE MS 108 997 1001 36 HOLDINGS SERVICE RESPONSE TIME 95TH PERCENTILE MS 140 1207 1207 109 NUMBER OF REQUESTS USING FALLBACK METHOD 0 83 170 500
You must have JavaScript enabled to view digital editions.