当前位置:网站首页>Redis persistence
Redis persistence
2022-07-27 05:28:00 【A dream without trace BZY】
One 、 Persistence concept
Persistence has a wide range , From memory to hard disk, this is called persistence ; Data backup is also called persistence ( therefore mysql It's also persistent )
Two 、redis Persistent classification
1、RDB: Take a snapshot
Update the data every time point . The occupied volume is relatively small 、 Fast recovery ; But the data loss may be great ( Default RDB, It can be turned on manually AOF, Once on AOF You will no longer read snapshot files, but only log files )
2、AOF: journal
Close to real-time updates ( This is configurable ). The occupied volume is relatively large 、 Slow recovery ; But data loss may be small
AOF Two modes :
- Real time updates : Write and update the log . because redis It is a single thread. If it is completely real-time, the efficiency will be very low , Every time you write data to memory, you have to write it to hard disk , Then you can process other requests
- hand os: The operating system is based on pagecache( Page caching ) To update , every other 5s Update and reach 10% memory update , These two work together . Data will be lost but no RDB serious )
Because it's a log , So every update operation will be recorded , But the last record is actually useful , So the volume is big 、 Slow recovery . But you can configure rewriting to update useless information , However, this is not real-time, but there are trigger conditions, such as extremely large or to a certain point in time . here we are 4.x After the version AOF Improved , When it comes to rewriting , It does not loop through and delete useless information , It takes snapshots directly in memory , Put the snapshot directly into AOF Replace the original record ( Delete the original directly ), Then new
边栏推荐
- 2022 Zhengzhou light industry Freshmen's competition topic - I won't say if I'm killed
- Notes Series docker installation PostgreSQL 14
- B1028 census
- 用户的管理-限制
- 6 zigzag conversion of leetcode
- 秒杀系统设计
- Set static IP for raspberry pie
- The provision of operation and maintenance manager is significantly affected, and, for example, it is like an eep command
- [CSAPP] Application of bit vectors | encoding and byte ordering
- B1024 scientific counting method
猜你喜欢

Differences among bio, NiO and AIO

Scientific Computing Library -- Matplotlib

Notes Series docker installation PostgreSQL 14

JVM上篇:内存与垃圾回收篇六--运行时数据区-本地方法&本地方法栈

ERP system brand

What should test / development programmers over 35 do? Many objective factors

Message reliability processing
![[optical flow] - data format analysis, flowwarp visualization](/img/7d/2fefc32813ec0c93115e4b290b0944.png)
[optical flow] - data format analysis, flowwarp visualization

用户的管理-限制

JVM上篇:内存与垃圾回收篇五--运行时数据区-虚拟机栈
随机推荐
B1028 census
Flask的传参以及返回的响应
B1023 组个最小数
Selenium element operation
Day5 --- Flask-RESTful请求响应与SQLAlchemy基础
Li Hongyi machine learning team learning punch in activity day01 --- introduction to machine learning
JVM Part 1: memory and garbage collection part 10 - runtime data area - direct memory
如何查看导师的评价
JVM Part 1: memory and garbage collection part 5 -- runtime data area virtual machine stack
2022 Zhengzhou light industry Freshmen's competition topic - I won't say if I'm killed
B1021 single digit statistics
李宏毅机器学习组队学习打卡活动day04---深度学习介绍和反向传播机制
268.missing number of leetcode
Cenos7更新MariaDB
笔记系列k8s编排MySQL容器-有状态的容器创建过程
mq常见问题
B1023 group minimum
Shell course summary
2022年郑州轻工业新生赛题目-打死我也不说
Database connection pool & Druid usage