当前位置:网站首页>The most common usage scenarios for redis
The most common usage scenarios for redis
2022-06-23 21:48:00 【FHAdmin】
1、 Counter
It can be done to String Add and subtract , So as to realize the counter function .
Redis This kind of memory database has very high read and write performance , It is very suitable to store the number of frequent reads and writes .
2、 cache
Put hot data in memory , Set the maximum memory usage and the elimination strategy to ensure the cache hit rate .
3、 Session cache
have access to Redis To store session information of multiple application servers .
When the application server no longer stores the user's session information , It's no longer a state , A user can request any application server , This makes it easier to achieve high availability and scalability .
4、 Full page caching (FPC)
Except for basic conversations token outside ,Redis It's also very simple FPC platform .
With Magento For example ,Magento Provides a plug-in to use Redis As the full page cache backend .(java The whole project fhadmin.cn) Besides , Yes WordPress For users of ,Pantheon There is a very good plug-in wp-redis, This plugin will help you load the pages you have visited as quickly as possible .
5、 Lookup table
for example DNS Records are very suitable for use Redis For storage .
Lookup tables are similar to caching , It's also used Redis Quick search features . But the contents of the lookup table cannot be invalidated , And cached content can be invalidated , Because caching is not a reliable source of data .
6、 Message queue ( Release / Subscribe to the function )
List It's a two-way list , Can pass lpush and rpop Write and read messages
But it's best to use Kafka、RabbitMQ Wait for message middleware .
7、 Distributed lock implementation
In a distributed scenario , You cannot use locks in a stand-alone environment to synchronize processes on multiple nodes .
have access to Redis Self contained SETNX Command to implement distributed locks , besides , You can also use the official RedLock Distributed lock implementation .
8、 Other
Set Can achieve intersection 、 Operations such as Union , So as to achieve common friends and other functions .
ZSet Can achieve orderly operation , So as to achieve ranking and other functions .
边栏推荐
- How to batch generate UPC-A codes
- Take you through the distributed file system
- 智能座舱SoC竞争升级,国产7nm芯片迎来重要突破
- Connect edgex gateway to thingsboard IOT platform
- Troubleshooting the problem that the channel cannot play after easycvr cascades to the upper platform
- 微信小程序中发送网络请求
- Smart cockpit SOC competition upgraded, and domestic 7Nm chips ushered in an important breakthrough
- Improve efficiency, take you to batch generate 100 ID photos with QR code
- Outlook開機自啟+關閉時最小化
- Minimisé lorsque Outlook est allumé + éteint
猜你喜欢

个税怎么算?你知道吗

Beitong G3 game console unpacking experience. It turns out that mobile game experts have achieved this

Uncover the secrets of Huawei cloud enterprise redis issue 16: acid'true' transactions beyond open source redis

HDLBits-> Circuits-> Arithmetic Circuitd-> 3-bit binary adder

Sending network request in wechat applet

Find my information | Apple may launch the second generation airtag. Try the Lenz technology find my solution

Bluetooth chip | Renesas and Ti launch new Bluetooth chip, try Lenz st17h65 Bluetooth ble5.2 chip

Introduction to scikit learn machine learning practice

Selenium批量查询运动员技术等级

Code implementation of CAD drawing online web measurement tool (measuring distance, area, angle, etc.)
随机推荐
Polar cycle graph and polar fan graph of high order histogram
Explain the rainbow ingress universal domain name resolution mechanism
[proteus simulation] lcd1602+ds1307 key setting simple clock
TDD development mode recommendation process
I'm in Shenzhen. Where can I open an account? Is online account opening safe?
CAD图在线Web测量工具代码实现(测量距离、面积、角度等)
Phpkf CMS 3.00 beta y6 remote code execution
The new track of flagship chip is finally clear
Is it safe to open an account for flush stock?
Is PMP necessary?
德国弗莱堡大学、希尔德斯海姆大学等联合 | Zero-Shot AutoML with Pretrained Models(基于预训练模型的零样本AutoML)
How to correctly divide data into databases and tables
Improve efficiency, take you to batch generate 100 ID photos with QR code
How to solve the loss of video source during easynvr split screen switching?
Common commands for cleaning up kubernetes cluster resources
Lightweight, dynamic and smooth listening, hero earphone hands-on experience, can really create
Cool 3D sphere text cloud effect!
Who do you want to open a stock account? Is it safe to open an account online?
小程序ssl证书过期是什么原因导致的?小程序ssl证书到期了怎么解决?
Meaning of the last seven digits of wider face