jedis,lettuce,redisson对比

jedis是一个老牌的java的redis客户端,仅支持同步的方式连接,redis官网有一句这样的话

Jedis is a synchronous Java client for Redis. Use Lettuce if you need a more advanced Java client that also supports asynchronous and reactive connections。

官方也推荐如果需要异步或者响应式的支持,可以使用lettuce。下面摘抄一下 lettuce官网的介绍

Lettuce is a scalable thread-safe Redis client for synchronous, asynchronous and reactive usage. Multiple threads may share one connection if they avoid blocking and transactional operations such as BLPOP and MULTI/EXEC. Lettuce is built with netty. Supports advanced Redis features such as Sentinel, Cluster, Pipelining, Auto-Reconnect and Redis data models。

总结一下就是lettuce底层使用netty进行通信,是线程安全的,并且支持异步和响应式编程,在高并发的情况下,效率会更高。

再来看下redisson的官方介绍

Redisson is the Java Client and Real-Time Data Platform for Redis or Valkey. Providing the most convenient and easiest way to work with Redis or Valkey. Redisson objects provide an abstraction layer between Redis or Valkey and your Java code, which allowing maintain focus on data modeling and application logic

redisson对分布式的锁,集合提供了更好的支持,通过一些简单的api就可以访问。

相关推荐
007php0076 小时前
百度面试题解析:微服务架构、Dubbo、Redis及其一致性问题(一)
redis·百度·docker·微服务·容器·职场和发展·架构
长安城没有风6 小时前
从入门到精通【Redis】Redis 典型应⽤ --- 分布式锁
数据库·redis·分布式
爬山算法10 小时前
Redis(69)Redis分布式锁的优点和缺点是什么?
数据库·redis·分布式
2401_8370885011 小时前
Redis通用命令
数据库·redis·缓存
zl97989912 小时前
Redis-缓存问题(穿透、击穿、雪崩)
redis
摇滚侠16 小时前
Spring Boot 3零基础教程,yml文件中配置和类的属性绑定,笔记15
spring boot·redis·笔记
cr7xin17 小时前
基于Session和Redis实现短信验证码登录
数据库·redis·缓存
DemonAvenger19 小时前
深入浅出 Redis 布隆过滤器:从原理到实战,10 年经验总结
数据库·redis·性能优化
爬山算法1 天前
Redis(66)Redis如何实现分布式锁?
数据库·redis·分布式
恋红尘1 天前
Redis面试八股
数据库·redis·面试