当前位置:网站首页>redis RDB AOF

redis RDB AOF

2022-07-04 21:19:00 Daily enlightenment

RDB The description is a snapshot 、 copy

AOF It describes the log

redis How is it done rdb The way of , The default time point data

The way of the first command :save Command triggers foreground blocking ,bgsave The command triggers the back-end asynchronous non blocking mode

The second configuration file gives bgsave The rules of , use save This logo

RDB disadvantages : Zippers are not supported , Only one... Is supported dump.rdb, Relatively more data is lost , It is easy to lose window data between time points

RDB advantage : similar java Serialization in , Faster recovery

AOF advantage : Less data

AOF disadvantages : Infinitely larger , Slow recovery

redis in ,RDB and AOF It can be turned on at the same time , If used AOF, Only use AOF recovery ,4.0 after ,AOF Contained in the RDB Total quantity , Add record new write operation

AOF How to keep the advantages , Reduce disadvantages ?

hdfs,fsimage+edits.log Let the log record only the incremental consolidation process

4.0 Before , rewrite ( Delete offset command , Merge repeated commands ), Finally, it is a pure instruction log file

4.0 after , rewrite , Put the old data RDB To AOF In file , And incrementally in the form of instructions APPEND To AOF,AOF It's a mixture , Take advantage of RDB Fast and full amount of logs

原网站

版权声明
本文为[Daily enlightenment]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/185/202207042018229630.html