当前位置:网站首页>What is persistence? What are RDB and AOF in redis persistence?
What is persistence? What are RDB and AOF in redis persistence?
2022-06-25 04:27:00 【Life is sweet and good luck is good】
What is persistence
Persistence (Persistence), That's data ( Like objects in memory ) Save to a permanent storage device ( Disk ). The main application of persistence is to store objects in memory in database , Or stored in a disk file 、XML Data files and so on .
Persistence is the mechanism that transforms program data between persistent and transient states .
JDBC It's a persistence mechanism . file IO It's also a persistence mechanism .
We understand it this way :
Staying constant for a certain period of time is persistence , Persistence is about time .
The data in the database is the persistent data , As long as you don't delete or modify .
For example IE Once in browser Session In the session Session Object variables are also invariant , yes Session Persistent in container .
There are many ways to persist objects , Depending on the period, there are ,page,Session,Application.
The object serialization mechanism needs to save the state of the object to a file , Then we can reconstruct the object by reading in the object state , Restore program state ,
The process of object serialization is one of the methods of object persistence , Save objects to a file .
RDB What is it?
RDB Persistence is the process of saving a snapshot of the current process data to the hard disk , Trigger RDB The persistence process is divided into manual and automatic triggers .
1. Trigger mechanism
Manual trigger corresponds to save and bgsave command :DB saved on disk
bgsave command :Background saving started by pid 3152
DB saved on disk
RDB: 0MB of memory userd by copy-on-write
Background saving terminated with success
AOF What is it?
AOF(append only file) Persistence : Each write is logged as a separate log , Reexecute on reboot AOF The command in the file achieves the purpose of recovering data .AOF Its main function is to solve the real-time problem of data persistence , So far Redis The mainstream way of persistence .
边栏推荐
- Siddhartha: the book of life can be regurgitated frequently
- How much do you know about the use value of WMS warehouse management system
- 彻底理解数据库事务
- Nodejs connects to MySQL through heidisql, and ER appears_ BAD_ DB_ ERROR: Unknown database 'my_ db_ books'
- [proteus simulation] Arduino uno key controls the flashing increase / decrease display of nixie tube
- 文本关键词提取:ansj
- A-table mouse over the display hand, the current line can be clicked
- PHP code audit 2 - these functions must be known and understood
- Summary of various problems encountered by cocos2d-x
- 【LeetCode】22. 括号生成
猜你喜欢

5 key indicators of SEO: ranking + traffic + session + length of stay + bounce rate
![LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路](/img/ad/69fce7cf064479a0ddd477fb935de2.png)
LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路

Basic use of OBS browser+ browser

讲座记录《惯性导航的新应用——惯性测量》

Smart wind power: operation and maintenance of digital twin 3D wind turbine intelligent equipment

Flutter FittedBox组件

无法安装redis接口

1. Phase II of the project - user registration and login

"Comment positionner l'industrie" dans la planification industrielle locale / parc

2. play the chromatic harmonica
随机推荐
Lecture record: new application of inertial navigation - inertial measurement
How many images can opencv open?
"How to carry out industrial positioning" in local / Park industrial planning
Should I use on or where for the left join
如何绘制产业招商地图
MySQL order by
List rendering in wechat applet
NFT Insider #63:The Sandbox与时代杂志达成合作,YGG成立西班牙subDAO
[kubernetes series] installation and use of Helm
Vigilance against over range collection of privacy - ten mobile app violations
L'épée leetcode fait référence au chemin leetcode de l'offre II 091 pour peindre la maison [planification dynamique] heroding
Text keyword extraction: ansj
What is the difference between learning code, rolling code and fixed code? The number of repeated codes, coding capacity and the principle of rolling code
Communication problems in parent and child components of uniapp
Lecture record: data processing methods and applications of various spatial geodetic techniques
95% 程序员都在这里摸鱼……
Comparison of towe/ JIRA / tapd / Zen collaboration platforms
【LeetCode】22. 括号生成
numpy np tips:使用opencv对数组插值放缩到固定形状 cv2.resize(res, dsize=(64, 64), interpolation=cv2.INTER_CUBIC)
Summary of various problems encountered by cocos2d-x