The spring Boot framework is already integrated with Redis. The jedis Client used by default in 1.x.x is now the default jedis Client used in 2.X. x. The difference between the two clients is as follows: Jedis and lettuce are both Redis clients

If you want to use Jedis in a multi-threaded environment, you need to use a connection pool. Each thread takes its own Jedis instance. As the number of connections increases, the cost of physical connections becomes high. The Lettuce connection is based on Netty, connection instances can be shared between multiple threads, so a multi-threaded application can use the same connection instance without worrying about the number of concurrent threads. Of course, this is also a scalable design. If one connection instance is not enough, it can be added as needed.

Being asynchronous allows us to make better use of system resources without wasting threads waiting for network or disk I/O. Lettuce is based on Netty, which is a multi-threaded, event-driven I/O framework, so Lettuce can help us take full advantage of asynchrony.

Reference: www.cnblogs.com/taiyonghai/… Github.com/spring-proj…