当前位置:网站首页>Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
Principles, advantages and disadvantages of two persistence mechanisms RDB and AOF of redis
2022-07-06 13:40:00 【Wake up duck, did you program today?】
Here is Redis The advantages and disadvantages of the two persistence mechanisms are also very important :
Redis Based on Key-Value Structure of the memory database ,Redis for fear of Redis A problem of data loss caused by failure provides RDB and AOF Two persistence mechanisms
- RDB The persistence mechanism is implemented through snapshots , In other words, according to a trigger condition of the snapshot, the data snapshot in memory will be written to the disk and stored in the form of binary compressed files RDB There are many snapshot methods as follows :
- perform bgsave Command triggers an asynchronous snapshot , perform save Command triggers a synchronized snapshot , The difference between the two : Synchronizing snapshots can block the client's execution instructions
- according to redis.conf The configuration in the file , Automatic triggering bgsave
- The master-slave copy will trigger

- AOF Persistence is a near real-time approach , hold Redis Server Execute the transaction command for additional storage , That is, the customer is performing a data change operation ,Redis Such a command will be appended to aof In the buffer of , Then write the data in the buffer to the disk aof In the document , When finally Really persistent data to disk aof In the document , It is determined according to the disk brushing strategy , in addition AOF A way of appending this instruction will cause AOOF Too large file brings obvious IO Performance issues , therefore Redis For such a situation, it provides AOF Rewrite mechanism , When AOF When the file size reaches a certain value, the same instructions in the file will be compressed


RDB and AOF Advantages and disadvantages :
- RDB Is to trigger persistence at regular intervals , Therefore, the data security is low ,AOF It can achieve real-time persistence , Data security is high
- RDB Files are persisted by compression by default ,AOF Stored are execution instructions , therefore RDB Performance ratio during data recovery AOF It is better to
The advantages and disadvantages also depend on the current specific application scenarios !!!!
边栏推荐
- (ultra detailed onenet TCP protocol access) arduino+esp8266-01s access to the Internet of things platform, upload real-time data collection /tcp transparent transmission (and how to obtain and write L
- MySQL中count(*)的实现方式
- 5. Download and use of MSDN
- Network layer 7 protocol
- This time, thoroughly understand the MySQL index
- 甲、乙机之间采用方式 1 双向串行通信,具体要求如下: (1)甲机的 k1 按键可通过串行口控制乙机的 LEDI 点亮、LED2 灭,甲机的 k2 按键控制 乙机的 LED1
- There is always one of the eight computer operations that you can't learn programming
- 1.初识C语言(1)
- [the Nine Yang Manual] 2022 Fudan University Applied Statistics real problem + analysis
- 西安电子科技大学22学年上学期《基础实验》试题及答案
猜你喜欢

3.输入和输出函数(printf、scanf、getchar和putchar)

C language Getting Started Guide

1. C language matrix addition and subtraction method

FAQs and answers to the imitation Niuke technology blog project (II)

甲、乙机之间采用方式 1 双向串行通信,具体要求如下: (1)甲机的 k1 按键可通过串行口控制乙机的 LEDI 点亮、LED2 灭,甲机的 k2 按键控制 乙机的 LED1

ABA问题遇到过吗,详细说以下,如何避免ABA问题

Service ability of Hongmeng harmonyos learning notes to realize cross end communication

MySQL lock summary (comprehensive and concise + graphic explanation)

About the parental delegation mechanism and the process of class loading

透彻理解LRU算法——详解力扣146题及Redis中LRU缓存淘汰
随机推荐
arduino+DS18B20温度传感器(蜂鸣器报警)+LCD1602显示(IIC驱动)
Thoroughly understand LRU algorithm - explain 146 questions in detail and eliminate LRU cache in redis
Cookie和Session的区别
C语言入门指南
【九阳神功】2019复旦大学应用统计真题+解析
C language Getting Started Guide
Differences among fianl, finally, and finalize
仿牛客技术博客项目常见问题及解答(二)
1.C语言初阶练习题(1)
FAQs and answers to the imitation Niuke technology blog project (III)
2.初识C语言(2)
Floating point comparison, CMP, tabulation ideas
Redis实现分布式锁原理详解
4.二分查找
使用Spacedesk实现局域网内任意设备作为电脑拓展屏
为什么要使用Redis
Questions and answers of "basic experiment" in the first semester of the 22nd academic year of Xi'an University of Electronic Science and technology
ArrayList的自动扩容机制实现原理
MySQL事务及实现原理全面总结,再也不用担心面试
(super detailed II) detailed visualization of onenet data, how to plot with intercepted data flow