当前位置:网站首页>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 .
边栏推荐
- 95% 程序员都在这里摸鱼……
- Failed to install redis interface
- EasyRecovery15非常好用的电脑数据恢复软件
- navicat可不可以直接操作安卓数据库SQLite
- 2. play the chromatic harmonica
- Development of trading system (XII) - Official quickfix document
- Siddhartha: the book of life can be regurgitated frequently
- MySQL插入过程报错1062,但是我没有该字段。
- Openmmlab environment configuration
- 2021.4.15 note the difference between let, const and VaR in ES6
猜你喜欢

Lecture record: history and development of strapdown inertial navigation solution

DAP data scheduling function improvement description

Hello CTP (IV) - CTP transaction API

1280_ C language to find the average value of two unsigned integer

Exercise: how difficult is it to simulate the blessing lottery two-color ball - China 500W grand prize? Just run the code.

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

1. first knowledge of chromatic harmonica
![LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路](/img/ad/69fce7cf064479a0ddd477fb935de2.png)
LeetCode 剑指Offer II 091 粉刷房子[动态规划] HERODING的LeetCode之路

地方/園區產業規劃之 “ 如何進行產業定比特 ”

Lecture record: new application of inertial navigation - inertial measurement
随机推荐
微信小程序父子组件之间传值
论文阅读《LSD-SLAM: Large-Scale Direct Monocular SLAM》
i. Max development board learning record
Laravel document sorting 4. Controller
AI quantitative transaction (II) -- tushare financial data framework
How to draw an industry investment map
La gamme NFT Color, qui représente la diversité, est en ligne sur la plate - forme du marché Sandbox
A-table mouse over the display hand, the current line can be clicked
SQL, CTE, flg case problems
马斯克发布人形机器人,AI对马斯克为什么意义重大?
General steps for QT compiling database plug-ins
openmmlab-环境配置
PostgreSQL数据库WAL——RM_HEAP_ID日志记录动作
515. 在每个树行中找最大值 / 剑指 Offer II 095. 最长公共子序列
PHP code audit 1 - php Ini
acmStreamOpen返回值问题
什么是持久化?redis 持久化中的RDB和AOF是什么?
【LeetCode】22. bracket-generating
地方/園區產業規劃之 “ 如何進行產業定比特 ”
Laravel document sorting 1. Installation and Preliminary Configuration