当前位置:网站首页>What are RDB and AOF
What are RDB and AOF
2022-07-06 20:49:00 【51CTO】
RDB:Redis DataBase, Writes a snapshot of a dataset in memory within a specified time interval ⼊ disk , The actual operation process is fork⼀ individual ⼦ process , First write the data set to ⼊ The temporary file , After writing successfully , Replace the previous ⽂ Pieces of , use ⼆ Binary compressed storage .
advantage :
- Whole Redis The database will contain only ⼀ individual ⽂ Pieces of dump.rdb, Easy persistence .
- Good disaster tolerance , Easy backup .
- Maximize performance ,fork Sub process to complete the write operation , Let the main process continue processing commands , So it is IO Maximize . Use a single child process for persistence , The main process will not enter ⾏ whatever IO operation , To ensure the redis A high performance
- Relative to the dataset ⼤ when , Than AOF It's more efficient to start .
shortcoming :
- Data security is low .RDB It's the interval ⼀ For a while ⾏ Persistence , If between persistence redis Hair ⽣ fault , Will send ⽣ Data loss . So this kind of ⽅ The formula is more suitable when the data requirements are not strict .
- because RDB It's through fork⼦ Process to assist in data persistence ⼯ Made , therefore , If the dataset is smaller ⼤ when , This may cause the entire server to stop ⽌ Service for hundreds of milliseconds , Even 1 Second .
AOF:Append Only File, Record every... Processed by the server in the form of a log ⼀ Write it 、 Delete operation , The query operation will not record , Record as text , Can open ⽂ See the detailed operation record
advantage :
- Data security ,Redis Provided in 3 Medium synchronization policy , Synchronization per second 、 Sync and out of sync per change . in fact , Synchronization per second is also done asynchronously , It's also very efficient , The difference is ⼀ Once the system goes down , So this ⼀ Data modified within seconds will be lost . And every modification is synchronized , We can think of it as synchronous persistence , That is, every time ⽣ All data changes will be immediately recorded on disk .
- adopt append Pattern writing ⽂ Pieces of , Even if the server goes down halfway, it will not destroy the existing content , Can pass redis check-aof Tools to solve data ⼀ A sexual question .
- AOF The mechanism rewrite Pattern . On a regular basis AOF⽂ Piece to rewrite , In order to achieve the purpose of compression
shortcoming :
- AOF File than RDB The file is big , And the recovery speed is slow .
- When the data set is large , Than rdb Low starting efficiency .
- Operational efficiency is not RDB high , AOF⽂ Piece ratio RDB High update frequency , priority of use AOF Restore data ,AOF Than RDB Safer and bigger ,RDB Performance ratio AOF good , If both have priority loading AOF.
边栏推荐
- Boder radius has four values, and boder radius exceeds four values
- What is the difference between procedural SQL and C language in defining variables
- 【每周一坑】计算100以内质数之和 +【解答】输出三角形
- Discussion on beegfs high availability mode
- Mécanisme de fonctionnement et de mise à jour de [Widget Wechat]
- 解剖生理学复习题·VIII血液系统
- C language games - minesweeping
- Common doubts about the introduction of APS by enterprises
- “罚点球”小游戏
- Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an
猜你喜欢
Gui Gui programming (XIII) - event handling
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
【DSP】【第二篇】了解C6678和创建工程
拼多多败诉,砍价始终差0.9%一案宣判;微信内测同一手机号可注册两个账号功能;2022年度菲尔兹奖公布|极客头条
Infrared thermometer based on STM32 single chip microcomputer (with face detection)
Quel genre de programmation les enfants apprennent - ils?
知识图谱构建流程步骤详解
Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an
What programming do children learn?
使用.Net驱动Jetson Nano的OLED显示屏
随机推荐
Learn to punch in Web
B-jiege's tree (pressed tree DP)
Simple continuous viewing PTA
“罚点球”小游戏
Redis insert data garbled solution
User defined current limiting annotation
Maximum likelihood estimation and cross entropy loss
Can novices speculate in stocks for 200 yuan? Is the securities account given by qiniu safe?
How to turn a multi digit number into a digital list
In unity space, an object moves around a fixed point on the sphere at a fixed speed
Recyclerview not call any Adapter method :onCreateViewHolder,onBindViewHolder,
【每周一坑】信息加密 +【解答】正整数分解质因数
1500萬員工輕松管理,雲原生數據庫GaussDB讓HR辦公更高效
2022 construction electrician (special type of construction work) free test questions and construction electrician (special type of construction work) certificate examination
请问sql group by 语句问题
##无yum源安装spug监控
【DSP】【第一篇】开始DSP学习
Core principles of video games
设计你的安全架构OKR
Detailed explanation of knowledge map construction process steps