当前位置:网站首页>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 .
边栏推荐
- Shanghai benchmarking enterprise · Schneider Electric visited benchmarking learning lean production, smart logistics supply chain and digital transformation
- What hard disk does the ECS use? What are the functions of the ECS
- Lighthouse open source application practice: snipe it
- Explain the rainbow ingress universal domain name resolution mechanism
- Connect edgex gateway to thingsboard IOT platform
- 数据可视化之:没有西瓜的夏天不叫夏天
- [js] generate random array
- Notepad++ installing the jsonview plug-in
- How to use smart cloud disk service differences between local disk service and cloud disk service
- One article to help you understand automatic injection
猜你喜欢

《scikit-learn机器学习实战》简介

Outlook開機自啟+關閉時最小化

高阶柱状图之极环图与极扇图

Analysis of Alibaba cloud Tianchi competition -- prediction of o2o coupon

蓝牙芯片|瑞萨和TI推出新蓝牙芯片,试试伦茨科技ST17H65蓝牙BLE5.2芯片

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

Simple code and design concept of "back to top"

Embedded development: embedded foundation -- the difference between restart and reset

CAD图在线Web测量工具代码实现(测量距离、面积、角度等)

HDLBits-> Circuits-> Arithmetic Circuitd-> 3-bit binary adder
随机推荐
Phpkf CMS 3.00 beta y6 remote code execution
How to make a label for an electric fan
Dart series: look at me for security. The security feature in dart is null safety
智能座舱SoC竞争升级,国产7nm芯片迎来重要突破
Beitong G3 game console unpacking experience. It turns out that mobile game experts have achieved this
Find My资讯|苹果可能会推出第二代AirTag,试试伦茨科技Find My方案
SAP Migo mobile type 311 attempts to determine the batch, and the system reports an error -batch determination not Po
Start /affinity specifies the number of vcpu to run OpenSSL speed to test the performance of a single vcpu
《阿里云天池大赛赛题解析》——O2O优惠卷预测
Flink practical tutorial: advanced 4-window top n
Tdsql elite challenge CVM voucher usage guide
Detailed explanation of logical structure, physical structure and data operation
How to batch generate video QR code
Wechat is new. You can create applications from Excel
Raid card with hardware knowledge (5)
SAP retail wrmo replenishment monitoring
Meaning of the last seven digits of wider face
小程序ssl证书过期是什么原因导致的?小程序ssl证书到期了怎么解决?
How to create cloud disk service how to create cloud disk service backup?
What about the cloud disk service status error? How to format the cloud disk service?