11

I am considering Lettuce and Redisson java clients for use in my application server (to connect to Redis). I haven't been able to find a proper comparison of the two from people who have tried them both or one of them in a single common place. The only detailed comparison I have seen is here and a few other links all published by Redisson itself. The other link I found was this SO post which has not been received very well.

I would like to hear from people who have actually consumed both or either of the clients, their experiences/use-cases and what were the pros and/or cons. I currently have a clustered Redis setup and I am using Lettuce. Lettuce achieves what I want. However it had some pain points with discovering new nodes in the cluster upon failover. I raised this in this SO thread and was able to resolve it as explained in the answer. In the positive side I find the Lettuce documentation much cleaner and easier to follow compared to that of Redisson's.

I am mainly considering a move to Redisson because I am hoping to use Redisson's implementation of RedLock by Redis for the purposes of Leader election between multiple instances of my app-server. Lettuce does not provide an implementation of it. Hence, the only option out-of-box is Redisson. In this case I would also have to get rid of Lettuce completely and Redisson alone. How is Redissons support for Redis cluster deployments. I was wondering does Redisson have reported/pending issues with cluster node discovery on failover (I haven't seen any in their repo). I have also read concerns over the library being bulky and not as lightweight as Lettuce is.

Given the above concerns and the knowledge I already have I would like to know comments about the use of both of these clients to help me with making a decision.

Thank you

Shabirmean
  • 2,341
  • 4
  • 21
  • 34
  • 1
    General "*share your experience*" type of questions are ill suited for SO format and thus deemed out of scope. – PM 77-1 Aug 10 '20 at 19:31
  • 2
    But can I get a comparative analysis between the clients in order to help me with a decision. I have outlined by use case and the expectation. I can rephrase it – Shabirmean Aug 10 '20 at 19:35
  • 1
    I have not tried the auto-rediscovery one since we're using a managed Redis offered by a cloud platform, thus don't need to worry about it. Though I'm pretty certain that Redisson offers it since it's production ready client used by lots of companies I know. It can be a drop-in replacement for Lettuce and works well except a few edge cases, like the Redis INFO command, Lettuce implements it while Redisson doesn't – AwesomeHunter Aug 11 '20 at 05:14
  • @AwesomeHunter I'm afraid you're mistaken here. INFO command can be executed on every Redis node. Like this: RedisSingle nodes = redisson.getRedisNodes(RedisNodes.SINGLE); RedisMaster node = nodes.getInstance(); Map allResponse = node.info(RedisNode.InfoSection.ALL); – Nikita Koksharov Sep 17 '20 at 05:45
  • You can emulate a compareAndSet by providing a Redis script (search for compare and set + redis) that is executed against your key. Together with TTL is what I use. I also would like to know if redisson is really a good idea as it hides a lot of the implementation stuff and redis is not particular rocket science. Also it is a commercial company meaning who knows if they screw with the community version's quality (burned by another company back in the days, so redisson is not to blame but my experience). I settled with lettuce and would upgrade if I would need it but not needed it... . – Martin Kersten Mar 21 '21 at 09:14

0 Answers0