My team and I have been trying to check different libraries for Redis. We're all new to this implementation. We initially tried Jedis then now we're trying Lettuce. In Jedis, we have added a log to check the Current Pool Usage while doing a performance test. I got it from here: https://gist.github.com/JonCole/925630df72be1351b21440625ff2671f
We use the logs to basically adjust configurations in our system; to check whether the default configs can hold our daily load or if should we adjust further.
The code in the link is just like this:
int active = jedisPool.getNumActive(); int idle = jedisPool.getNumIdle(); int waiters = jedisPool.getNumWaiters();
We are just retrieving the num active and num idle and the number of waiters. The log seems correct since values can be seen in the logs. I also used the same implementation for Lettuce although the Num Active always throws a value of zero though the number of idle connections decreases. I
This is how I initialized the value for GenericObjectPool in Lettuce:
GenericObjectPool<StatefulRedisClusterConnection<String, String>> pool = ConnectionPoolSupport .createGenericObjectPool(() -> clusterClient.connect(), new GenericObjectPoolConfig());
I just want to know if this is an expected behavior for Lettuce Async? Or where should I check further to get the correct amount for active instances? Thanks!