当前位置:网站首页>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 .
边栏推荐
- Connect edgex gateway to thingsboard IOT platform
- Basic concepts and common methods of syntactic dependency analysis
- How to download offline versions of Firefox and chrome
- Go bubbling, cocktail, quick, insert sort
- 智能座舱SoC竞争升级,国产7nm芯片迎来重要突破
- Build DNS server in Intranet
- Is it safe to open an account for flush stock?
- How to use smart cloud disk service differences between local disk service and cloud disk service
- Cloud database smooth disassembly scheme
- Troubleshooting the problem that the channel cannot play after easycvr cascades to the upper platform
猜你喜欢

Simple code and design concept of "back to top"

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

Cloud native practice of meituan cluster scheduling system

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

CAD图在线Web测量工具代码实现(测量距离、面积、角度等)
![Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text](/img/b1/71cc36c45102bdb9c06e099eb42267.jpg)
Harmonyos application development -- mynotepad[memo][api v6] based on textfield and image pseudo rich text

Outlook开机自启+关闭时最小化

Introduction to scikit learn machine learning practice

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

实验五 模块、包和库
随机推荐
Markdown syntax summary
Salesforce heroku (IV) application in salesforce (connectedapp)
CAD图在线Web测量工具代码实现(测量距离、面积、角度等)
Ffmpeg for audio and video commands
Wechat is new. You can create applications from Excel
Open source C # WPF control library --newbeecoder UI User Guide (II)
v-chart
Gradle asked seven times. You should know that~
Meaning of the last seven digits of wider face
Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading
TDD开发模式推荐流程
Data visualization: summer without watermelon is not summer
Infrastructure splitting of service splitting
蓝牙芯片|瑞萨和TI推出新蓝牙芯片,试试伦茨科技ST17H65蓝牙BLE5.2芯片
Xgboost implements text classification and sklearn NLP library tfidfvectorizer
Wechat smart operation 3.0+ Alipay digital transformation 3.0
Outlook开机自启+关闭时最小化
It's very interesting. Make an app to decorate the Christmas hat on Christmas!
How to make a label for an electric fan
Cool 3D sphere text cloud effect!