当前位置:网站首页>Redis AOF log persistence
Redis AOF log persistence
2022-07-28 02:47:00 【yu-yuan】
AOF working principle
When you use Redis Do something , Will write what you do to a text file .
To configure :

appendonly This is aof Log function Whether to open yes

We are using AOF How to improve write speed and data persistence , Create a balanced plan , Here you can use
appendfsync always : Every time 1 All commands are synchronized to AOF Security , Slow speed
no : Write to the operating system , Because the operating system determines the buffer size , Write uniformly AOF, Low synchronization frequency , Fast .
eveysec : compromise proposal , Write once a second

no-appendfsync-on-rewrite yes: # Exporting rdb During snapshot , Do you want to stop syncing aof
auto-aof-rewrite-percentage 100 #aof The size of the file is larger than the last time it was rewritten , growth rate 100% when , rewrite
auto-aof-rewrite-min-size 64mb #aof file , At least more than 64M when , rewrite (bgrewriteaof Rewrite the command )
Interview frequently asked :
notes : stay dump rdb In the process ,aof If you stop synchronizing , Will you lose ?
answer : Can't , All operations are cached in memory queues , dump After completion , Unified operation .
notes : aof What does rewriting mean ?
answer : aof Rewriting refers to putting data in memory , Reverse into command , Write to .aof In the Journal To solve the problem aof The problem of too large log .
ask : If rdb file , and aof Files exist , Who will be the first to recover data ?
answer : rdb rdb Recover data quickly
ask : 2 Whether the two can be used at the same time ?
answer : Sure , And it's recommended
ask : When you recover rdb and aof Which recovers faster
answer : rdb fast , Because it is a memory mapping of data , Load directly into memory , and aof Is the command , It needs to be carried out item by item
边栏推荐
- [hcip] BGP Foundation
- Common SQL statement query
- A 64 bit 8-stage pipelined adder based on FPGA
- Wechat campus maintenance and repair applet graduation design finished product of applet completion work (4) opening report
- Canvas from getting started to persuading friends to give up (graphic version)
- Usage of delegate
- Canonical Address
- 2020.7.7 eth price analysis
- Smart contract security -- selfdestroy attack
- Product axure9 English version, using repeater repeater repeater to realize multi-choice and single choice
猜你喜欢

Important arrangements - the follow-up live broadcast of dx12 engine development course will be held at station B

POC模拟攻击利器 —— Nuclei入门(一)

第二季度邮件安全报告:邮件攻击暴增4倍,利用知名品牌获取信任

Representation of children and brothers of trees

What is eplato cast by Plato farm on elephant swap?

【信号处理】基于高阶统计量特征的通信系统中微弱信号检测附matlab代码
![[image hiding] digital image information hiding system based on DCT, DWT, LHA, LSB, including various attacks and performance parameters, with matlab code](/img/69/1b547c35fd4af18405b586ad581da7.png)
[image hiding] digital image information hiding system based on DCT, DWT, LHA, LSB, including various attacks and performance parameters, with matlab code

How do you use the jar package sent by others (how to use the jar package sent by others)

Center-based 3D Object Detection and Tracking(基于中心的3D目标检测和跟踪 / CenterPoint)论文笔记

初识C语言 -- 操作符和关键字,#define,指针
随机推荐
pytest最好的测试框架
New infrastructure helps the transformation and development of intelligent road transportation
cn+dt
数据中台夯实数据基础
[leetcode] 13. linked list cycle · circular linked list
【微信小程序开发(五)】接口按照根据开发版体验版正式版智能配置
特征值和特征向量
[signal processing] weak signal detection in communication system based on the characteristics of high-order statistics with matlab code
[image hiding] digital image information hiding system based on DCT, DWT, LHA, LSB, including various attacks and performance parameters, with matlab code
[hcip] routing strategy, strategic routing
[brother hero's July training] day 27: picture
[hcip] BGP Foundation
Notes for the fourth time of first knowing C language
【LeetCode】13. Linked List Cycle·环形链表
ERD online 4.0.0 free private deployment scheme
Retainface use error: modulenotfounderror: no module named'rcnn.cyton.bbox'
D multi production single consumption
[hcip] BGP features
初识C语言 -- 结构体,分支和循环语句
Feign calls get and post records