Springboot2.x version integrated redis instructions (lettuce, redisson)

General outline

I. Introduction

Currently, the mainstream springboot 2.x version integrates redis, mainly using lettuce and redisson.
As a new redis client, lettuce uses asynchronous non-blocking IO based on netty, which is thread-safe. The advantage is that it provides many advanced redis functions, such as clusters, sentries, pipelines, etc. The disadvantage is that the API is abstract and the learning cost is high. Lettuce is good, but Jedis was born earlier than him.
As the distributed client of redis, redission also uses asynchronous non-blocking IO based on netty, which is thread-safe. The advantage is that it provides many distributed operations and advanced functions of redis. The disadvantage is that the API is abstract and the learning cost is high. The redisson function is relatively simple, does not support string operations, and does not support Redis features such as sorting, transactions, pipelines, and partitions.

2. Details

The related uses and principles of lettuce and redisson will be explained later.
springboot integrates lettuce
springboot integrates redisson

RRateLimiter distributed current limiting description of redisson

Guess you like

Origin blog.csdn.net/xunmengyou1990/article/details/127836404