Hi Hystrix experts:
We are starting to integrate Hystrix with our own memcached library. We have a generic memcached class so that different caches can extend from it to performance Set/Get, but we don't want to define different Get or Set Command for each cache so we are trying to find a way to differentiate them and tune them separately.
There are two ways to do it:
First, we can provide different CommandKey, so the config looks like this:
hystrix.command.cacheOneGetCommand.circuitBreaker.sleepWindowInMilliseconds=200
hystrix.command.cacheTwoGetCommand.circuitBreaker.sleepWindowInMilliseconds=200
Second, we can define some prefix for the cache so it looks like:
cacheOne.command.default.circuitBreaker.sleepWindowInMilliseconds=200
cacheTwo.command.default.circuitBreaker.sleepWindowInMilliseconds=200
The first is much easier to implement, but second is also not very hard by defining our own HystrixPropertiesStrategy. We prefer the second way because it is more flexible. We can still use "default" in each cache.
But we found it breaks the hystrix-dashboard, because in the second way, commandKey is same for all caches, and we will see many GetCommand metrics but cannot tell which is which.
Questions:
1) Is there a easy way to show group key along with the command key in dashboard? Or why we don't show it by default? What's the concern?
2) Regarding two solutions, which is better? What's the best practices?
We just started the project to integrate hystrix with all caches, so we are trying to learn those area other than the core feature. I am sure other people have had the same experiences so hopefully someone could share their thought?
Best,
Yaowen