当前位置:网站首页>Redis 持久化机制
Redis 持久化机制
2022-07-06 15:35:00 【InfoQ】
怎么保证 Redis 挂掉之后再重启数据可以进行恢复?
什么是 RDB 持久化?
redis.conf
save 900 1 #在900秒(15分钟)之后,如果至少有1个key发生变化,Redis就会自动触发BGSAVE命令创建快照。
save 300 10 #在300秒(5分钟)之后,如果至少有10个key发生变化,Redis就会自动触发BGSAVE命令创建快照。
save 60 10000 #在60秒(1分钟)之后,如果至少有10000个key发生变化,Redis就会自动触发BGSAVE命令创建快照。
什么是 AOF 持久化?
appendonly yes
server.aof_buf
appendfsync
appendonly.aof
appendfsync always #每次有数据修改发生时都会写入AOF文件,这样会严重降低Redis的速度
appendfsync everysec #每秒钟同步一次,显式地将多个写命令同步到硬盘
appendfsync no #让操作系统决定何时进行同步
appendfsync everysec
边栏推荐
- [leetcode] 19. Delete the penultimate node of the linked list
- Financial professionals must read book series 6: equity investment (based on the outline and framework of the CFA exam)
- 专为决策树打造,新加坡国立大学&清华大学联合提出快速安全的联邦学习新系统
- hdu 5077 NAND(暴力打表)
- Jafka来源分析——Processor
- 【踩坑合辑】Attempting to deserialize object on CUDA device+buff/cache占用过高+pad_sequence
- go多样化定时任务通用实现与封装
- Aardio - construct a multi button component with customplus library +plus
- Mysql 身份认证绕过漏洞(CVE-2012-2122)
- QT信号和槽
猜你喜欢
[compilation principle] LR (0) analyzer half done
config:invalid signature 解决办法和问题排查详解
Self made j-flash burning tool -- QT calls jlinkarm DLL mode
leetcode:面试题 17.24. 子矩阵最大累加和(待研究)
Should novice programmers memorize code?
Balanced Multimodal Learning via On-the-fly Gradient Modulation(CVPR2022 oral)
新手程序员该不该背代码?
rust知识思维导图xmind
Web APIs DOM time object
signed、unsigned关键字
随机推荐
Custom swap function
ICLR 2022 | pre training language model based on anti self attention mechanism
[compilation principle] LR (0) analyzer half done
The ceiling of MySQL tutorial. Collect it and take your time
2014阿里巴巴web前实习生项目分析(1)
NPDP认证|产品经理如何跨职能/跨团队沟通?
第十九章 使用工作队列管理器(二)
Chapter 19 using work queue manager (2)
npm无法安装sharp
Void keyword
signed、unsigned关键字
Signed and unsigned keywords
2022-07-04 the high-performance database engine stonedb of MySQL is compiled and run in centos7.9
Pit encountered by handwritten ABA
[untitled]
UE4 blueprint learning chapter (IV) -- process control forloop and whileloop
memcached
How to use flexible arrays?
Slide the uniapp to a certain height and fix an element to the top effect demo (organize)
Cloud native technology container knowledge points