Hystrix icon indicating copy to clipboard operation
Hystrix copied to clipboard

HystrixCommandMetrics slow initialization

Open ghost opened this issue 6 years ago • 5 comments

Please optimize the HystrixCommandMetrics initialization time. It slows down the first request(s) by approx. 500ms - 2 s: hystrix-profiling

https://stackoverflow.com/questions/49032383/hystrix-slow-response-on-first-request

ghost avatar Jul 19 '18 13:07 ghost

I'm experiencing this same behaviour... Has there been confirmation of the issue or any workaround provided? I'm using 1.5.12

I managed to profile some of my tests: image

This get worse in production, as each subsequent HystrixCommand being initialized takes longer each time (seems like it's doubling the time from each previous call).

dagonblanco avatar Nov 14 '18 11:11 dagonblanco

@ramato-procon , were you able to find a solution for this problem?

pratyushbansal avatar Feb 06 '20 19:02 pratyushbansal

@pratyushbansal I'm initializing all metrics at startup as a workaround, like described in stackoverflow. So startup time is longer, but the first requests are processed faster.

But we will switch to resilience4j soon as hystrix is not maintained anymore.

ghost avatar Feb 09 '20 13:02 ghost

Hi @ramato-procon, could you share an example to see how you initialized hystrix metrics on launch ?

We add the same issue and we are looking for a workaround before migrating to resilience4j...

dalexanco avatar May 16 '22 13:05 dalexanco

好的,我已收到。

ThinkingMan007 avatar May 16 '22 13:05 ThinkingMan007