当前位置:网站首页>Redis persistence RDB
Redis persistence RDB
2022-07-26 05:37:00 【Life goes on and battles go on】
Redis Is a memory database , If you do not save the database state in memory to disk , So once the server process exits , The database state in the server also disappears , therefore Redis Provides persistence
RDB(Redis DataBase)
What is? RDB
Write the data set snapshot in memory to disk within the specified time interval , That's what jargon says Snapshot snapshot , It will recover soon Read the file directly into memory .
Redis Will create... Separately (fork) A subprocess to persist , Write the data to a temporary file first , Process to be persisted It's all over , Replace the last persistent file with this temporary file . The whole process , The main process is not going to do anything IO Operation of the . This ensures extremely high performance . If large-scale data recovery is needed , And it's not very sensitive to the integrity of data recovery , that RDB The way is better than AOF It's more efficient .RDB The disadvantage is that the data may be lost after the last persistence .
Fork
Fork Its function is to copy the same process as the current process . All the data for the new process ( Variable , environment variable , Program counter, etc ) The values are consistent with the original process , But it's a whole new process , And as a child of the original process .
rdb The saved file is dump.rdb

Configuration location and location SNAPSHOTTING analysis

The trigger condition mechanism here , We can modify and test :
save 120 10 # 120 Seconds to modify 10 Times trigger RDB
- save Just keep it , Whatever else , All blocked
- bgsave,Redis The snapshot operation will be performed asynchronously in the background , The snapshot can also respond to client requests . Can pass lastsave Command gets the last time the snapshot was executed successfully .
127.0.0.1:6379> config get dir
1) "dir"
2) "/www/server/redis"

边栏推荐
- 代码审计之百家cms
- Hack the box - Web requests module detailed Chinese tutorial
- TZC 1283: simple sort - Comparative sort
- A trick to teach you to easily understand Potter's map
- Mongodb common commands
- C language explanation series -- understanding of functions (3) formal parameters, arguments, nested calls and chain access
- Development projects get twice the result with half the effort, a large collection of open source STM32 driver Libraries
- 攻防世界-FlatScience
- FTP experiment and overview
- How to conduct test case review
猜你喜欢

Lamp architecture

NetCore MySql The user specified as a definer (‘admin‘@‘%‘) does not exist

Basic methods of realizing licensing function in C language
![[personal summary] end of July 24, 2022](/img/9e/dfc37c2684aa8849291817782c947b.png)
[personal summary] end of July 24, 2022

Okaleido launched the fusion mining mode, which is the only way for Oka to verify the current output

高分子物理试题库

Embedded general learning route arrangement

87. Disturb string

我又发现了超赞的软硬件项目,全部开源

MBA-day28 数的概念-练习题
随机推荐
MBA-day29 算术-绝对值初步认识
MongoDB 常用命令
代码审计之百家cms
Redis official visualization tool, with high appearance value and powerful functions!
Go exceed API source code reading (VI) -- deletesheet (sheet string)
NetCore MySql The user specified as a definer (‘admin‘@‘%‘) does not exist
Hack the box - Web requests module detailed Chinese tutorial
《MongoDB入门教程》第08篇 比较运算符
高效,可靠,安全的串口通讯开源方案
MySQL optimization
Hack The Box - Web Requests Module详细讲解中文教程
Webassembly 01 basic information
C language explanation series - understanding of functions (4) declaration and definition of functions, simple exercises
How students apply for free idea
Development to testing: a six-year road to automation from scratch
调试利器!一款轻量级日志库 log.c
Unity Profiler
嵌入式通用学习路线整理
Application of canoe XML in test modules
Data warehouse construction -dim floor